summaryrefslogtreecommitdiffstats
path: root/Source/cmUseMangledMesaCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-05-19 14:30:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-05-19 14:33:26 (GMT)
commit273257222ee6207dcb9ad290a08db5d6b7cc9db8 (patch)
tree0cc1b5bc33298f556f4438ba04dc689a9f4c09d1 /Source/cmUseMangledMesaCommand.cxx
parent7024fe33b8ea1d1fba3bf881f8c530688107c505 (diff)
downloadCMake-273257222ee6207dcb9ad290a08db5d6b7cc9db8.zip
CMake-273257222ee6207dcb9ad290a08db5d6b7cc9db8.tar.gz
CMake-273257222ee6207dcb9ad290a08db5d6b7cc9db8.tar.bz2
Source: change parameters to std::string
Diffstat (limited to 'Source/cmUseMangledMesaCommand.cxx')
-rw-r--r--Source/cmUseMangledMesaCommand.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx
index 88e415a..4358194 100644
--- a/Source/cmUseMangledMesaCommand.cxx
+++ b/Source/cmUseMangledMesaCommand.cxx
@@ -30,7 +30,7 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args,
this->SetError(e);
return false;
}
- const char* destDir = args[1].c_str();
+ const std::string& destDir = args[1];
std::vector<std::string> files;
cmSystemTools::Glob(inputDir, "\\.h$", files);
if (files.empty()) {
@@ -42,14 +42,14 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args,
std::string path = inputDir;
path += "/";
path += f;
- this->CopyAndFullPathMesaHeader(path.c_str(), destDir);
+ this->CopyAndFullPathMesaHeader(path, destDir);
}
return true;
}
-void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(const char* source,
- const char* outdir)
+void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(
+ const std::string& source, const std::string& outdir)
{
std::string dir, file;
cmSystemTools::SplitProgramPath(source, dir, file);
@@ -65,9 +65,9 @@ void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(const char* source,
cmSystemTools::ReportLastSystemError("");
return;
}
- cmsys::ifstream fin(source);
+ cmsys::ifstream fin(source.c_str());
if (!fin) {
- cmSystemTools::Error("Could not open file for read in copy operation",
+ cmSystemTools::Error("Could not open file for read in copy operation" +
source);
return;
}