diff options
author | Brad King <brad.king@kitware.com> | 2017-05-28 13:13:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-05-28 13:13:12 (GMT) |
commit | f8642f953d3d8547bd31fcb35a4737fa91d9126f (patch) | |
tree | 1a56170d6d43c1515b49142c7223ea06eb7faa5d /Source/cmake.cxx | |
parent | f9ea6247c10fa0b39977f9b75d266e7282b19a1b (diff) | |
parent | 2c2bb5f527b4c0e0eca7867492c046be23818c9a (diff) | |
download | CMake-f8642f953d3d8547bd31fcb35a4737fa91d9126f.zip CMake-f8642f953d3d8547bd31fcb35a4737fa91d9126f.tar.gz CMake-f8642f953d3d8547bd31fcb35a4737fa91d9126f.tar.bz2 |
Merge topic 'reduce-string-copying'
2c2bb5f5 Remove unnecessary operator<< usage
1e4e2f99 Remove unused variables
25486156 Improved checking for number of arguments passed
86dc86dd Add const-reference qualifications
76bdb407 Change std::basic_string<char> to std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !886
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 53e9ab0..6894393 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -301,7 +301,7 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args) { bool findPackageMode = false; for (unsigned int i = 1; i < args.size(); ++i) { - std::string arg = args[i]; + std::string const& arg = args[i]; if (arg.find("-D", 0) == 0) { std::string entry = arg.substr(2); if (entry.empty()) { @@ -617,7 +617,7 @@ void cmake::SetArgs(const std::vector<std::string>& args, bool haveToolset = false; bool havePlatform = false; for (unsigned int i = 1; i < args.size(); ++i) { - std::string arg = args[i]; + std::string const& arg = args[i]; if (arg.find("-H", 0) == 0) { directoriesSet = true; std::string path = arg.substr(2); @@ -2146,7 +2146,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args) // process the arguments bool writeToStdout = true; for (unsigned int i = 1; i < args.size(); ++i) { - std::string arg = args[i]; + std::string const& arg = args[i]; if (arg.find("-G", 0) == 0) { std::string value = arg.substr(2); if (value.empty()) { |