mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
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
This commit is contained in:
@@ -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 = ";";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user