mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 08:08:24 -05:00
Refactor: Use cmStrCat to construct error strings
Replace string construction using std::stringstream with cmStrCat and cmWrap.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user