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/cmTargetIncludeDirectoriesCommand.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/cmTargetIncludeDirectoriesCommand.cxx')
-rw-r--r-- | Source/cmTargetIncludeDirectoriesCommand.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx index d6918c0..d099349 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.cxx +++ b/Source/cmTargetIncludeDirectoriesCommand.cxx @@ -9,6 +9,7 @@ #include "cmListFileCache.h" #include "cmMakefile.h" #include "cmMessageType.h" +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include "cmTarget.h" @@ -39,9 +40,9 @@ std::string cmTargetIncludeDirectoriesCommand::Join( for (std::string const& it : content) { if (cmSystemTools::FileIsFullPath(it) || cmGeneratorExpression::Find(it) == 0) { - dirs += sep + it; + dirs += cmStrCat(sep, it); } else { - dirs += sep + prefix + it; + dirs += cmStrCat(sep, prefix, it); } sep = ";"; } |