summaryrefslogtreecommitdiff
path: root/Source/cmSourceGroupCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-07 15:45:02 +0000
committerKitware Robot <kwrobot@kitware.com>2019-08-07 11:54:53 -0400
commitbbf4a5771f8113ce5b88968c4dd3def2fbcd9354 (patch)
treef24c69250b525f26c2d0cb100468f74d08bccabb /Source/cmSourceGroupCommand.cxx
parentdd53122be5b142e97ac02d1dec62719db29bc39e (diff)
parent18b0330b86cae2771a54021e390f157a097c8a99 (diff)
downloadcmake-bbf4a5771f8113ce5b88968c4dd3def2fbcd9354.tar.gz
Merge topic 'tidy_inefficient_string'
18b0330b86 clang-tidy: Enable performance-inefficient-string-concatenation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3648
Diffstat (limited to 'Source/cmSourceGroupCommand.cxx')
-rw-r--r--Source/cmSourceGroupCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx
index 0f69c84e16..880773bc1d 100644
--- a/Source/cmSourceGroupCommand.cxx
+++ b/Source/cmSourceGroupCommand.cxx
@@ -56,7 +56,7 @@ bool rootIsPrefix(const std::string& root,
{
for (std::string const& file : files) {
if (!cmHasPrefix(file, root)) {
- error = "ROOT: " + root + " is not a prefix of file: " + file;
+ error = cmStrCat("ROOT: ", root, " is not a prefix of file: ", file);
return false;
}
}
@@ -94,7 +94,7 @@ bool addFilesToItsSourceGroups(const std::string& root,
std::vector<std::string> tokenizedPath;
if (!prefix.empty()) {
- tokenizedPath = tokenizePath(prefix + '/' + sgFilesPath);
+ tokenizedPath = tokenizePath(cmStrCat(prefix, '/', sgFilesPath));
} else {
tokenizedPath = tokenizePath(sgFilesPath);
}