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/cmExtraCodeBlocksGenerator.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/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index f47744b..4146db8 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -16,6 +16,7 @@ #include "cmRange.h" #include "cmSourceFile.h" #include "cmStateTypes.h" +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" @@ -178,18 +179,18 @@ void Tree::BuildUnitImpl(cmXMLWriter& xml, { for (std::string const& f : files) { xml.StartElement("Unit"); - xml.Attribute("filename", fsPath + path + "/" + f); + xml.Attribute("filename", cmStrCat(fsPath, path, "/", f)); xml.StartElement("Option"); xml.Attribute("virtualFolder", - "CMake Files\\" + virtualFolderPath + path + "\\"); + cmStrCat("CMake Files\\", virtualFolderPath, path, "\\")); xml.EndElement(); xml.EndElement(); } for (Tree const& folder : folders) { - folder.BuildUnitImpl(xml, virtualFolderPath + path + "\\", - fsPath + path + "/"); + folder.BuildUnitImpl(xml, cmStrCat(virtualFolderPath, path, "\\"), + cmStrCat(fsPath, path, "/")); } } |