Refactor: Use cmStrCat to construct error strings

Replace string construction using std::stringstream with cmStrCat and
cmWrap.
This commit is contained in:
Asit Dhal
2019-09-15 19:11:02 +02:00
committed by Brad King
parent 1423507a71
commit 9dba84cfa5
31 changed files with 545 additions and 797 deletions
+3 -4
View File
@@ -7,7 +7,7 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <utility>
#include "cm_memory.hxx"
@@ -207,9 +207,8 @@ bool cmLoadCommandCommand(std::vector<std::string> const& args,
// Try to find the program.
std::string fullPath = cmSystemTools::FindFile(moduleName, path);
if (fullPath.empty()) {
std::ostringstream e;
e << "Attempt to load command failed from file \"" << moduleName << "\"";
status.SetError(e.str());
status.SetError(cmStrCat("Attempt to load command failed from file \"",
moduleName, "\""));
return false;
}