summaryrefslogtreecommitdiffstats
path: root/Source/cmUtilitySourceCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-28 13:13:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-28 13:13:12 (GMT)
commitf8642f953d3d8547bd31fcb35a4737fa91d9126f (patch)
tree1a56170d6d43c1515b49142c7223ea06eb7faa5d /Source/cmUtilitySourceCommand.cxx
parentf9ea6247c10fa0b39977f9b75d266e7282b19a1b (diff)
parent2c2bb5f527b4c0e0eca7867492c046be23818c9a (diff)
downloadCMake-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/cmUtilitySourceCommand.cxx')
-rw-r--r--Source/cmUtilitySourceCommand.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx
index 37d8bfb..eabd7ef 100644
--- a/Source/cmUtilitySourceCommand.cxx
+++ b/Source/cmUtilitySourceCommand.cxx
@@ -23,7 +23,7 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args,
std::vector<std::string>::const_iterator arg = args.begin();
// The first argument is the cache entry name.
- std::string cacheEntry = *arg++;
+ std::string const& cacheEntry = *arg++;
const char* cacheValue = this->Makefile->GetDefinition(cacheEntry);
// If it exists already and appears up to date then we are done. If
// the string contains "(IntDir)" but that is not the
@@ -57,11 +57,11 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args,
// The second argument is the utility's executable name, which will be
// needed later.
- std::string utilityName = *arg++;
+ std::string const& utilityName = *arg++;
// The third argument specifies the relative directory of the source
// of the utility.
- std::string relativeSource = *arg++;
+ std::string const& relativeSource = *arg++;
std::string utilitySource = this->Makefile->GetCurrentSourceDirectory();
utilitySource = utilitySource + "/" + relativeSource;