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/cmBinUtilsLinuxELFLinker.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/cmBinUtilsLinuxELFLinker.cxx')
-rw-r--r-- | Source/cmBinUtilsLinuxELFLinker.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmBinUtilsLinuxELFLinker.cxx b/Source/cmBinUtilsLinuxELFLinker.cxx index 86846cb..6316a29 100644 --- a/Source/cmBinUtilsLinuxELFLinker.cxx +++ b/Source/cmBinUtilsLinuxELFLinker.cxx @@ -8,6 +8,7 @@ #include "cmMakefile.h" #include "cmMessageType.h" #include "cmRuntimeDependencyArchive.h" +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include <cmsys/RegularExpression.hxx> @@ -151,7 +152,7 @@ bool cmBinUtilsLinuxELFLinker::ResolveDependency( std::string& path, bool& resolved) { for (auto const& searchPath : searchPaths) { - path = searchPath + '/' + name; + path = cmStrCat(searchPath, '/', name); if (cmSystemTools::PathExists(path)) { resolved = true; return true; @@ -159,7 +160,7 @@ bool cmBinUtilsLinuxELFLinker::ResolveDependency( } for (auto const& searchPath : this->Archive->GetSearchDirectories()) { - path = searchPath + '/' + name; + path = cmStrCat(searchPath, '/', name); if (cmSystemTools::PathExists(path)) { std::ostringstream warning; warning << "Dependency " << name << " found in search directory:\n " |