diff options
Diffstat (limited to 'Source/cmUseMangledMesaCommand.cxx')
-rw-r--r-- | Source/cmUseMangledMesaCommand.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index 9648b21..88e415a 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -19,7 +19,7 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args, this->SetError("called with incorrect number of arguments"); return false; } - const char* inputDir = args[0].c_str(); + const std::string& inputDir = args[0]; std::string glh = inputDir; glh += "/"; glh += "gl.h"; @@ -34,7 +34,7 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args, std::vector<std::string> files; cmSystemTools::Glob(inputDir, "\\.h$", files); if (files.empty()) { - cmSystemTools::Error("Could not open Mesa Directory ", inputDir); + cmSystemTools::Error("Could not open Mesa Directory " + inputDir); return false; } cmSystemTools::MakeDirectory(destDir); @@ -60,8 +60,8 @@ void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(const char* source, tempOutputFile += ".tmp"; cmsys::ofstream fout(tempOutputFile.c_str()); if (!fout) { - cmSystemTools::Error("Could not open file for write in copy operation: ", - tempOutputFile.c_str(), outdir); + cmSystemTools::Error("Could not open file for write in copy operation: " + + tempOutputFile + outdir); cmSystemTools::ReportLastSystemError(""); return; } @@ -78,7 +78,7 @@ void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(const char* source, cmsys::RegularExpression includeLine( "^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]+)[\">]"); // regular expression for gl/ or GL/ in a file (match(1) of above) - cmsys::RegularExpression glDirLine("(gl|GL)(/|\\\\)([^<\"]+)"); + cmsys::RegularExpression glDirLine(R"((gl|GL)(/|\\)([^<"]+))"); // regular expression for gl GL or xmesa in a file (match(1) of above) cmsys::RegularExpression glLine("(gl|GL|xmesa)"); while (cmSystemTools::GetLineFromStream(fin, inLine)) { |