summaryrefslogtreecommitdiff
path: root/Source/cmLinkLineComputer.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-08-03 13:20:31 +0200
committerSebastian Holtermann <sebholt@xwmw.org>2019-08-05 17:21:00 +0200
commit18b0330b86cae2771a54021e390f157a097c8a99 (patch)
tree85b770ff9467bdc764d7b42ed2480016c26b2235 /Source/cmLinkLineComputer.cxx
parent2327cc0e0575175e8dec4b7a6fa6cafd5d0f7ca9 (diff)
downloadcmake-18b0330b86cae2771a54021e390f157a097c8a99.tar.gz
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/cmLinkLineComputer.cxx')
-rw-r--r--Source/cmLinkLineComputer.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index 4430f97d3d..5e3c790874 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -11,6 +11,7 @@
#include "cmOutputConverter.h"
#include "cmStateDirectory.h"
#include "cmStateTypes.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter,
@@ -115,16 +116,17 @@ std::string cmLinkLineComputer::ComputeLinkPath(
type = cmStateEnums::ImportLibraryArtifact;
}
- linkPath += " " + libPathFlag +
- item.Target->GetDirectory(cli.GetConfig(), type) +
- libPathTerminator + " ";
+ linkPath += cmStrCat(" ", libPathFlag,
+ item.Target->GetDirectory(cli.GetConfig(), type),
+ libPathTerminator, " ");
}
}
}
for (std::string const& libDir : cli.GetDirectories()) {
- linkPath += " " + libPathFlag + this->ConvertToOutputForExisting(libDir) +
- libPathTerminator + " ";
+ linkPath +=
+ cmStrCat(" ", libPathFlag, this->ConvertToOutputForExisting(libDir),
+ libPathTerminator, " ");
}
return linkPath;