diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-10 23:04:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-03-11 14:03:50 (GMT) |
commit | 21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch) | |
tree | 8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmExportCommand.cxx | |
parent | e21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff) | |
download | CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.zip CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.bz2 |
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
Diffstat (limited to 'Source/cmExportCommand.cxx')
-rw-r--r-- | Source/cmExportCommand.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index bda8dda..dcb77ba 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -92,7 +92,7 @@ bool cmExportCommand cmOStringStream e; e << "FILE option given filename \"" << this->Filename.GetString() << "\" which does not have an extension of \".cmake\".\n"; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } fname = this->Filename.GetString(); @@ -106,7 +106,7 @@ bool cmExportCommand cmOStringStream e; e << "FILE option given filename \"" << fname << "\" which is in the source tree.\n"; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -128,7 +128,7 @@ bool cmExportCommand { cmOStringStream e; e << "EXPORT signature does not recognise the APPEND option."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -137,7 +137,7 @@ bool cmExportCommand cmOStringStream e; e << "EXPORT signature does not recognise the " "EXPORT_LINK_INTERFACE_LIBRARIES option."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -147,7 +147,7 @@ bool cmExportCommand { cmOStringStream e; e << "Export set \"" << setName << "\" not found."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } this->ExportSet = setMap[setName]; @@ -164,18 +164,18 @@ bool cmExportCommand cmOStringStream e; e << "given ALIAS target \"" << *currentTarget << "\" which may not be exported."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } - if(cmTarget* target = gg->FindTarget(currentTarget->c_str())) + if(cmTarget* target = gg->FindTarget(*currentTarget)) { if(target->GetType() == cmTarget::OBJECT_LIBRARY) { cmOStringStream e; e << "given OBJECT library \"" << *currentTarget << "\" which may not be exported."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -184,7 +184,7 @@ bool cmExportCommand cmOStringStream e; e << "given target \"" << *currentTarget << "\" which is not built by this project."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } targets.push_back(*currentTarget); @@ -229,7 +229,7 @@ bool cmExportCommand ci = configurationTypes.begin(); ci != configurationTypes.end(); ++ci) { - ebfg->AddConfiguration(ci->c_str()); + ebfg->AddConfiguration(*ci); } } else @@ -266,7 +266,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args) { cmOStringStream e; e << "PACKAGE given unknown argument: " << args[i]; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -284,7 +284,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args) cmOStringStream e; e << "PACKAGE given invalid package name \"" << package << "\". " << "Package names must match \"" << packageExpr << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } |