diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-05-17 18:21:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-05-24 13:09:44 (GMT) |
commit | aa3649eb0488fe9ea82c330f2c0c606bbb9d32f4 (patch) | |
tree | 0709bde281596e328aa27adb41380bbd1cd046a9 /Source/cmListCommand.cxx | |
parent | 6ff03d463f40176389943100690cf1ca8593d739 (diff) | |
download | CMake-aa3649eb0488fe9ea82c330f2c0c606bbb9d32f4.zip CMake-aa3649eb0488fe9ea82c330f2c0c606bbb9d32f4.tar.gz CMake-aa3649eb0488fe9ea82c330f2c0c606bbb9d32f4.tar.bz2 |
clang-tidy: fix `performance-unnecessary-copy-initialization` lints
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r-- | Source/cmListCommand.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index ebd089b..d412534 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -1199,7 +1199,7 @@ bool HandleSortCommand(std::vector<std::string> const& args, const std::string messageHint = "sub-command SORT "; while (argumentIndex < args.size()) { - const std::string option = args[argumentIndex++]; + std::string const& option = args[argumentIndex++]; if (option == "COMPARE") { if (sortCompare != cmStringSorter::Compare::UNINITIALIZED) { std::string error = cmStrCat(messageHint, "option \"", option, @@ -1208,7 +1208,7 @@ bool HandleSortCommand(std::vector<std::string> const& args, return false; } if (argumentIndex < args.size()) { - const std::string argument = args[argumentIndex++]; + std::string const& argument = args[argumentIndex++]; if (argument == "STRING") { sortCompare = cmStringSorter::Compare::STRING; } else if (argument == "FILE_BASENAME") { @@ -1235,7 +1235,7 @@ bool HandleSortCommand(std::vector<std::string> const& args, return false; } if (argumentIndex < args.size()) { - const std::string argument = args[argumentIndex++]; + std::string const& argument = args[argumentIndex++]; if (argument == "SENSITIVE") { sortCaseSensitivity = cmStringSorter::CaseSensitivity::SENSITIVE; } else if (argument == "INSENSITIVE") { @@ -1259,7 +1259,7 @@ bool HandleSortCommand(std::vector<std::string> const& args, return false; } if (argumentIndex < args.size()) { - const std::string argument = args[argumentIndex++]; + std::string const& argument = args[argumentIndex++]; if (argument == "ASCENDING") { sortOrder = cmStringSorter::Order::ASCENDING; } else if (argument == "DESCENDING") { |