diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-26 19:58:51 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-26 19:58:51 (GMT) |
commit | 618fb23fc9838d344e2033c64bfc1a3a55bb7f61 (patch) | |
tree | abaabfaae8a9f5448d7ee062c757c61254792995 /Source/cmCTest.cxx | |
parent | acd8a73044e879286f0cfa24b54497a8307f204b (diff) | |
download | CMake-618fb23fc9838d344e2033c64bfc1a3a55bb7f61.zip CMake-618fb23fc9838d344e2033c64bfc1a3a55bb7f61.tar.gz CMake-618fb23fc9838d344e2033c64bfc1a3a55bb7f61.tar.bz2 |
Pass arguments that are not modified as const&.
Use clang-tidy's performance-unnecessary-value-param checker to find
value parameter declarations of expensive to copy types that are not
modified inside the function. Ignore findings in kwsys.
After applying the fix-its, manually change `const T&` to `T const&`.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 64e8078..bc36c5a 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -67,7 +67,7 @@ std::cerr << __LINE__ << " "; \ std::cerr -struct tm* cmCTest::GetNightlyTime(std::string str, bool tomorrowtag) +struct tm* cmCTest::GetNightlyTime(std::string const& str, bool tomorrowtag) { struct tm* lctime; time_t tctime = time(0); @@ -170,8 +170,8 @@ static size_t HTTPResponseCallback(void* ptr, size_t size, size_t nmemb, } int cmCTest::HTTPRequest(std::string url, HTTPMethod method, - std::string& response, std::string fields, - std::string putFile, int timeout) + std::string& response, std::string const& fields, + std::string const& putFile, int timeout) { CURL* curl; FILE* file; @@ -1481,7 +1481,7 @@ int cmCTest::GenerateNotesFile(const char* cfiles) return this->GenerateNotesFile(files); } -std::string cmCTest::Base64GzipEncodeFile(std::string file) +std::string cmCTest::Base64GzipEncodeFile(std::string const& file) { std::string tarFile = file + "_temp.tar.gz"; std::vector<std::string> files; @@ -1499,7 +1499,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file) return base64; } -std::string cmCTest::Base64EncodeFile(std::string file) +std::string cmCTest::Base64EncodeFile(std::string const& file) { size_t const len = cmSystemTools::FileLength(file); cmsys::ifstream ifs(file.c_str(), std::ios::in @@ -2208,7 +2208,7 @@ void cmCTest::SetNotesFiles(const char* notes) this->NotesFiles = notes; } -void cmCTest::SetStopTime(std::string time) +void cmCTest::SetStopTime(std::string const& time) { this->StopTime = time; this->DetermineNextDayStop(); |