diff options
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestGIT.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestLaunch.h | 6 | ||||
-rw-r--r-- | Source/CTest/cmCTestP4.h | 8 | ||||
-rw-r--r-- | Source/CTest/cmCTestVC.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestVC.h | 13 | ||||
-rw-r--r-- | Source/CTest/cmProcess.h | 14 |
6 files changed, 14 insertions, 31 deletions
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index da94754..56f805c 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -24,7 +24,7 @@ static unsigned int cmCTestGITVersion(unsigned int epic, unsigned int major, unsigned int minor, unsigned int fix) { // 1.6.5.0 maps to 10605000 - return fix + minor * 1000 + major * 100000 + epic * 10000000; + return epic * 10000000 + major * 100000 + minor * 1000 + fix; } cmCTestGIT::cmCTestGIT(cmCTest* ct, std::ostream& log) diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h index eabb608..c5a6476 100644 --- a/Source/CTest/cmCTestLaunch.h +++ b/Source/CTest/cmCTestLaunch.h @@ -24,14 +24,14 @@ public: /** Entry point from ctest executable main(). */ static int Main(int argc, const char* const argv[]); + cmCTestLaunch(const cmCTestLaunch&) = delete; + cmCTestLaunch& operator=(const cmCTestLaunch&) = delete; + private: // Initialize the launcher from its command line. cmCTestLaunch(int argc, const char* const* argv); ~cmCTestLaunch(); - cmCTestLaunch(const cmCTestLaunch&) = delete; - cmCTestLaunch& operator=(const cmCTestLaunch&) = delete; - // Run the real command. int Run(); void RunChild(); diff --git a/Source/CTest/cmCTestP4.h b/Source/CTest/cmCTestP4.h index d03f9cb..1889520 100644 --- a/Source/CTest/cmCTestP4.h +++ b/Source/CTest/cmCTestP4.h @@ -34,14 +34,6 @@ private: std::string Name; std::string EMail; std::string AccessTime; - - User() - : UserName() - , Name() - , EMail() - , AccessTime() - { - } }; std::map<std::string, User> Users; std::vector<std::string> P4Options; diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx index 9ba6456..d5711c5 100644 --- a/Source/CTest/cmCTestVC.cxx +++ b/Source/CTest/cmCTestVC.cxx @@ -126,7 +126,7 @@ std::string cmCTestVC::GetNightlyTime() snprintf(current_time, sizeof(current_time), "%04d-%02d-%02d %02d:%02d:%02d", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); - return std::string(current_time); + return { current_time }; } void cmCTestVC::Cleanup() diff --git a/Source/CTest/cmCTestVC.h b/Source/CTest/cmCTestVC.h index 9bd7229..7b03d10 100644 --- a/Source/CTest/cmCTestVC.h +++ b/Source/CTest/cmCTestVC.h @@ -95,15 +95,10 @@ protected: /** Represent change to one file. */ struct File { - PathStatus Status; - Revision const* Rev; - Revision const* PriorRev; - File() - : Status(PathUpdated) - , Rev(nullptr) - , PriorRev(nullptr) - { - } + PathStatus Status = PathUpdated; + Revision const* Rev = nullptr; + Revision const* PriorRev = nullptr; + File() = default; File(PathStatus status, Revision const* rev, Revision const* priorRev) : Status(status) , Rev(rev) diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index 64475c2..be030e4 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -52,9 +52,9 @@ public: }; State GetProcessStatus(); - int GetId() { return this->Id; } + int GetId() const { return this->Id; } void SetId(int id) { this->Id = id; } - int64_t GetExitValue() { return this->ExitValue; } + int64_t GetExitValue() const { return this->ExitValue; } cmDuration GetTotalTime() { return this->TotalTime; } enum class Exception @@ -111,15 +111,11 @@ private: class Buffer : public std::vector<char> { // Half-open index range of partial line already scanned. - size_type First; - size_type Last; + size_type First = 0; + size_type Last = 0; public: - Buffer() - : First(0) - , Last(0) - { - } + Buffer() = default; bool GetLine(std::string& line); bool GetLast(std::string& line); }; |