summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-05-24 20:18:28 (GMT)
committerPavel Solodovnikov <hellyeahdominate@gmail.com>2017-05-26 16:50:11 (GMT)
commit86dc86dd6c66a6d61234efcddddddf466a6597d2 (patch)
treef7fcf0d9852d4d66b362a9c0fba67fd9d42661e8 /Source/cmcmd.cxx
parent76bdb4076277cda0e68e1d80cdf715020eab5a7a (diff)
downloadCMake-86dc86dd6c66a6d61234efcddddddf466a6597d2.zip
CMake-86dc86dd6c66a6d61234efcddddddf466a6597d2.tar.gz
CMake-86dc86dd6c66a6d61234efcddddddf466a6597d2.tar.bz2
Add const-reference qualifications
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index dc267e7..9f2e8b7 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -663,7 +663,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
// Command to change directory and run a program.
if (args[1] == "chdir" && args.size() >= 4) {
- std::string directory = args[2];
+ std::string const& directory = args[2];
if (!cmSystemTools::FileExists(directory.c_str())) {
cmSystemTools::Error("Directory does not exist for chdir command: ",
args[2].c_str());
@@ -883,8 +883,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
if (args[1] == "tar" && args.size() > 3) {
const char* knownFormats[] = { "7zip", "gnutar", "pax", "paxr", "zip" };
- std::string flags = args[2];
- std::string outFile = args[3];
+ std::string const& flags = args[2];
+ std::string const& outFile = args[3];
std::vector<std::string> files;
std::string mtime;
std::string format;
@@ -1077,9 +1077,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
int cmcmd::SymlinkLibrary(std::vector<std::string>& args)
{
int result = 0;
- std::string realName = args[2];
- std::string soName = args[3];
- std::string name = args[4];
+ std::string const& realName = args[2];
+ std::string const& soName = args[3];
+ std::string const& name = args[4];
if (soName != realName) {
if (!cmcmd::SymlinkInternal(realName, soName)) {
cmSystemTools::ReportLastSystemError("cmake_symlink_library");
@@ -1098,8 +1098,8 @@ int cmcmd::SymlinkLibrary(std::vector<std::string>& args)
int cmcmd::SymlinkExecutable(std::vector<std::string>& args)
{
int result = 0;
- std::string realName = args[2];
- std::string name = args[3];
+ std::string const& realName = args[2];
+ std::string const& name = args[3];
if (name != realName) {
if (!cmcmd::SymlinkInternal(realName, name)) {
cmSystemTools::ReportLastSystemError("cmake_symlink_executable");