diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-01-22 22:44:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-25 11:44:32 (GMT) |
commit | 55671b41d2d182ce8d3201012ec55badd7116615 (patch) | |
tree | 2878c340e32a5c5847d352d86f7d9a142751f13a /Source/CTest | |
parent | a7f5cd45e135dd51d67176fc40e2d769ac5f7db8 (diff) | |
download | CMake-55671b41d2d182ce8d3201012ec55badd7116615.zip CMake-55671b41d2d182ce8d3201012ec55badd7116615.tar.gz CMake-55671b41d2d182ce8d3201012ec55badd7116615.tar.bz2 |
clang-tidy: Use `= default`
Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
Diffstat (limited to 'Source/CTest')
22 files changed, 25 insertions, 55 deletions
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx index 365f267..b154caf 100644 --- a/Source/CTest/cmCTestBZR.cxx +++ b/Source/CTest/cmCTestBZR.cxx @@ -77,9 +77,7 @@ cmCTestBZR::cmCTestBZR(cmCTest* ct, std::ostream& log) cmSystemTools::PutEnv("BZR_PROGRESS_BAR=none"); } -cmCTestBZR::~cmCTestBZR() -{ -} +cmCTestBZR::~cmCTestBZR() = default; class cmCTestBZR::InfoParser : public cmCTestVC::LineParser { diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index d07bd21..3c96ebb 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -507,7 +507,7 @@ public: : FTC(ftc) { } - FragmentCompare() {} + FragmentCompare() = default; bool operator()(std::string const& l, std::string const& r) const { // Order files by modification time. Use lexicographic order diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx index 6e1ada1..6e8f73f 100644 --- a/Source/CTest/cmCTestCVS.cxx +++ b/Source/CTest/cmCTestCVS.cxx @@ -16,9 +16,7 @@ cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log) { } -cmCTestCVS::~cmCTestCVS() -{ -} +cmCTestCVS::~cmCTestCVS() = default; class cmCTestCVS::UpdateParser : public cmCTestVC::LineParser { diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx index 5967b74..6b7601b 100644 --- a/Source/CTest/cmCTestConfigureHandler.cxx +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -11,9 +11,7 @@ #include <ostream> #include <string> -cmCTestConfigureHandler::cmCTestConfigureHandler() -{ -} +cmCTestConfigureHandler::cmCTestConfigureHandler() = default; void cmCTestConfigureHandler::Initialize() { diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 6c68f46..1e99c75 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -112,9 +112,7 @@ private: cmDuration TimeOut; }; -cmCTestCoverageHandler::cmCTestCoverageHandler() -{ -} +cmCTestCoverageHandler::cmCTestCoverageHandler() = default; void cmCTestCoverageHandler::Initialize() { diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index 4ede3d4..c0225ea 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -31,9 +31,7 @@ cmCTestGIT::cmCTestGIT(cmCTest* ct, std::ostream& log) this->CurrentGitVersion = 0; } -cmCTestGIT::~cmCTestGIT() -{ -} +cmCTestGIT::~cmCTestGIT() = default; class cmCTestGIT::OneLineParser : public cmCTestVC::LineParser { @@ -477,7 +475,7 @@ private: std::string EMail; unsigned long Time = 0; long TimeZone = 0; - Person() {} + Person() = default; }; void ParsePerson(const char* str, Person& person) diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index dc1bba0..d3020b5 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -18,9 +18,7 @@ cmCTestGenericHandler::cmCTestGenericHandler() this->TestLoad = 0; } -cmCTestGenericHandler::~cmCTestGenericHandler() -{ -} +cmCTestGenericHandler::~cmCTestGenericHandler() = default; void cmCTestGenericHandler::SetOption(const std::string& op, const char* value) { diff --git a/Source/CTest/cmCTestGlobalVC.cxx b/Source/CTest/cmCTestGlobalVC.cxx index d2714d90..a2d4d2c 100644 --- a/Source/CTest/cmCTestGlobalVC.cxx +++ b/Source/CTest/cmCTestGlobalVC.cxx @@ -15,9 +15,7 @@ cmCTestGlobalVC::cmCTestGlobalVC(cmCTest* ct, std::ostream& log) this->PriorRev = this->Unknown; } -cmCTestGlobalVC::~cmCTestGlobalVC() -{ -} +cmCTestGlobalVC::~cmCTestGlobalVC() = default; const char* cmCTestGlobalVC::LocalPath(std::string const& path) { diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx index 9c6a80d..6fb99d8 100644 --- a/Source/CTest/cmCTestHG.cxx +++ b/Source/CTest/cmCTestHG.cxx @@ -18,9 +18,7 @@ cmCTestHG::cmCTestHG(cmCTest* ct, std::ostream& log) this->PriorRev = this->Unknown; } -cmCTestHG::~cmCTestHG() -{ -} +cmCTestHG::~cmCTestHG() = default; class cmCTestHG::IdentifyParser : public cmCTestVC::LineParser { diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 320647a..2b17d03 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -44,7 +44,7 @@ public: : Handler(handler) { } - ~TestComparator() {} + ~TestComparator() = default; // Sorts tests in descending order of cost bool operator()(int index1, int index2) const @@ -70,9 +70,7 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler() this->SerialTestRunning = false; } -cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler() -{ -} +cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler() = default; // Set the tests void cmCTestMultiProcessHandler::SetTests(TestMap& tests, diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index c0bdc17..435be97 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -19,9 +19,7 @@ cmCTestP4::cmCTestP4(cmCTest* ct, std::ostream& log) this->PriorRev = this->Unknown; } -cmCTestP4::~cmCTestP4() -{ -} +cmCTestP4::~cmCTestP4() = default; class cmCTestP4::IdentifyParser : public cmCTestVC::LineParser { diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx index afde61c..3bf66ca 100644 --- a/Source/CTest/cmCTestSVN.cxx +++ b/Source/CTest/cmCTestSVN.cxx @@ -26,9 +26,7 @@ cmCTestSVN::cmCTestSVN(cmCTest* ct, std::ostream& log) this->PriorRev = this->Unknown; } -cmCTestSVN::~cmCTestSVN() -{ -} +cmCTestSVN::~cmCTestSVN() = default; void cmCTestSVN::CleanupImpl() { diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index f417f53..1231f31 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -53,8 +53,8 @@ struct cmListFileFunction; class cmCTestScriptFunctionBlocker : public cmFunctionBlocker { public: - cmCTestScriptFunctionBlocker() {} - ~cmCTestScriptFunctionBlocker() override {} + cmCTestScriptFunctionBlocker() = default; + ~cmCTestScriptFunctionBlocker() override = default; bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf, cmExecutionStatus& /*status*/) override; // virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf); diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 5213bd3..9e1f409 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -31,7 +31,7 @@ class cmCTestSubmitHandler::ResponseParser : public cmXMLParser { public: ResponseParser() { this->Status = STATUS_OK; } - ~ResponseParser() override {} + ~ResponseParser() override = default; public: enum StatusType diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index 57e40ce..e3b7e9e 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -34,9 +34,7 @@ static const char* cmCTestUpdateHandlerUpdateToString(int type) return cmCTestUpdateHandlerUpdateStrings[type]; } -cmCTestUpdateHandler::cmCTestUpdateHandler() -{ -} +cmCTestUpdateHandler::cmCTestUpdateHandler() = default; void cmCTestUpdateHandler::Initialize() { diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx index 63bd0e6..374e73f 100644 --- a/Source/CTest/cmCTestVC.cxx +++ b/Source/CTest/cmCTestVC.cxx @@ -24,9 +24,7 @@ cmCTestVC::cmCTestVC(cmCTest* ct, std::ostream& log) this->Unknown.Rev = "Unknown"; } -cmCTestVC::~cmCTestVC() -{ -} +cmCTestVC::~cmCTestVC() = default; void cmCTestVC::SetCommandLineTool(std::string const& tool) { diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx index 308e6f7..63d6a15 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.cxx +++ b/Source/CTest/cmParseBlanketJSCoverage.cxx @@ -20,7 +20,7 @@ public: { } - virtual ~JSONParser() {} + virtual ~JSONParser() = default; std::string getValue(std::string const& line, int type) { diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx index 5bb6424..1669b07 100644 --- a/Source/CTest/cmParseCoberturaCoverage.cxx +++ b/Source/CTest/cmParseCoberturaCoverage.cxx @@ -24,7 +24,7 @@ public: this->CurFileName.clear(); } - ~XMLParser() override {} + ~XMLParser() override = default; protected: void EndElement(const std::string& name) override diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx index d99de06..9eda6f8 100644 --- a/Source/CTest/cmParseDelphiCoverage.cxx +++ b/Source/CTest/cmParseDelphiCoverage.cxx @@ -20,7 +20,7 @@ public: { } - virtual ~HTMLParser() {} + virtual ~HTMLParser() = default; bool initializeDelphiFile( std::string const& filename, diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx index 31e7cd4..b2d3b1b 100644 --- a/Source/CTest/cmParseJacocoCoverage.cxx +++ b/Source/CTest/cmParseJacocoCoverage.cxx @@ -23,7 +23,7 @@ public: this->PackageName.clear(); } - ~XMLParser() override {} + ~XMLParser() override = default; protected: void EndElement(const std::string& /*name*/) override {} diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx index 488d237..4a81ee4 100644 --- a/Source/CTest/cmParseMumpsCoverage.cxx +++ b/Source/CTest/cmParseMumpsCoverage.cxx @@ -18,9 +18,7 @@ cmParseMumpsCoverage::cmParseMumpsCoverage( { } -cmParseMumpsCoverage::~cmParseMumpsCoverage() -{ -} +cmParseMumpsCoverage::~cmParseMumpsCoverage() = default; bool cmParseMumpsCoverage::ReadCoverageFile(const char* file) { diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 7737f65..70ef8df 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -69,9 +69,7 @@ cmProcess::cmProcess(cmCTestRunTest& runner) this->StartTime = std::chrono::steady_clock::time_point(); } -cmProcess::~cmProcess() -{ -} +cmProcess::~cmProcess() = default; void cmProcess::SetCommand(const char* command) { |