diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-03 11:20:31 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-05 15:21:00 (GMT) |
commit | 18b0330b86cae2771a54021e390f157a097c8a99 (patch) | |
tree | 85b770ff9467bdc764d7b42ed2480016c26b2235 /Source/CTest/cmCTestScriptHandler.cxx | |
parent | 2327cc0e0575175e8dec4b7a6fa6cafd5d0f7ca9 (diff) | |
download | CMake-18b0330b86cae2771a54021e390f157a097c8a99.zip CMake-18b0330b86cae2771a54021e390f157a097c8a99.tar.gz CMake-18b0330b86cae2771a54021e390f157a097c8a99.tar.bz2 |
clang-tidy: Enable performance-inefficient-string-concatenation
Enables the clang-tidy test performance-inefficient-string-concatenation
and replaces all inefficient string concatenations with `cmStrCat`.
Closes: #19555
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index f8d9f1b..4288b25 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -30,6 +30,7 @@ #include "cmState.h" #include "cmStateDirectory.h" #include "cmStateSnapshot.h" +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include "cmake.h" @@ -663,8 +664,8 @@ int cmCTestScriptHandler::PerformExtraUpdates() fullCommand, &output, &output, &retVal, cvsArgs[0].c_str(), this->HandlerVerbose, cmDuration::zero() /*this->TimeOut*/); if (!res || retVal != 0) { - cmSystemTools::Error("Unable to perform extra updates:\n" + eu + - "\nWith output:\n" + output); + cmSystemTools::Error(cmStrCat("Unable to perform extra updates:\n", eu, + "\nWith output:\n", output)); return 0; } } @@ -934,7 +935,7 @@ bool cmCTestScriptHandler::TryToRemoveBinaryDirectoryOnce( continue; } - std::string fullPath = directoryPath + std::string("/") + path; + std::string fullPath = cmStrCat(directoryPath, "/", path); bool isDirectory = cmSystemTools::FileIsDirectory(fullPath) && !cmSystemTools::FileIsSymlink(fullPath); |