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.h | |
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.h')
-rw-r--r-- | Source/cmCTest.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 1c3490e..65ecaa4 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -108,8 +108,8 @@ public: * Perform an HTTP request. */ static int HTTPRequest(std::string url, HTTPMethod method, - std::string& response, std::string fields = "", - std::string putFile = "", int timeout = 0); + std::string& response, std::string const& fields = "", + std::string const& putFile = "", int timeout = 0); #endif /** Get a testing part id from its string name. Returns PartCount @@ -143,7 +143,7 @@ public: /* * A utility function that returns the nightly time */ - struct tm* GetNightlyTime(std::string str, bool tomorrowtag); + struct tm* GetNightlyTime(std::string const& str, bool tomorrowtag); /* * Is the tomorrow tag set? @@ -211,9 +211,9 @@ public: std::string CurrentTime(); //! tar/gzip and then base 64 encode a file - std::string Base64GzipEncodeFile(std::string file); + std::string Base64GzipEncodeFile(std::string const& file); //! base64 encode a file - std::string Base64EncodeFile(std::string file); + std::string Base64EncodeFile(std::string const& file); /** * Return the time remaining that the script is allowed to run in @@ -240,7 +240,7 @@ public: std::string GetCDashVersion(); std::string GetStopTime() { return this->StopTime; } - void SetStopTime(std::string time); + void SetStopTime(std::string const& time); // Used for parallel ctest job scheduling std::string GetScheduleType() { return this->ScheduleType; } |