Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/extras
diff options
context:
space:
mode:
authorChris Thrasher2023-12-28 16:39:19 -0600
committerMartin Hořeňovský2024-01-14 23:33:51 +0100
commit05786fa7ec66c19fa4699b5d21be3557a1b4161b (patch)
treee4e9202c6cbd3c6961bbc949cf955b20cee79c4c /extras
parentd79bfa05c7b69e4c9605d80473de5d0562bb89dc (diff)
downloadcatch3-05786fa7ec66c19fa4699b5d21be3557a1b4161b.tar.gz
Remove redundant destructors
Classes will automatically inherit the virtual-ness of their base class destructors. If the base class already has a virtual destructor and the derived class needs default destructor semantics then the derived class can omit defining the destructor in favor of the compiler automatically defining it. This has an additional benefit of reenabling move semantics. The presence of a user-specified destructor automatically disables move operations.
Diffstat (limited to 'extras')
-rw-r--r--extras/catch_amalgamated.hpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/extras/catch_amalgamated.hpp b/extras/catch_amalgamated.hpp
index 4f075857..80279c1e 100644
--- a/extras/catch_amalgamated.hpp
+++ b/extras/catch_amalgamated.hpp
@@ -7304,12 +7304,6 @@ namespace Detail {
}
public:
- ~IGenerator() override = default;
- IGenerator() = default;
- IGenerator(IGenerator const&) = default;
- IGenerator& operator=(IGenerator const&) = default;
-
-
// Returns the current element of the generator
//
// \Precondition The generator is either freshly constructed,
@@ -10707,8 +10701,6 @@ namespace Catch {
class TestRegistry : public ITestCaseRegistry {
public:
- ~TestRegistry() override = default;
-
void registerTest( Detail::unique_ptr<TestCaseInfo> testInfo, Detail::unique_ptr<ITestInvoker> testInvoker );
std::vector<TestCaseInfo*> const& getAllInfos() const override;
@@ -13376,8 +13368,6 @@ namespace Catch {
public:
JunitReporter(ReporterConfig&& _config);
- ~JunitReporter() override = default;
-
static std::string getDescription();
void testRunStarting(TestRunInfo const& runInfo) override;
@@ -13618,8 +13608,6 @@ namespace Catch {
m_shouldStoreSuccesfulAssertions = false;
}
- ~SonarQubeReporter() override = default;
-
static std::string getDescription() {
using namespace std::string_literals;
return "Reports test results in the Generic Test Data SonarQube XML format"s;
@@ -13666,7 +13654,6 @@ namespace Catch {
StreamingReporterBase( CATCH_MOVE(config) ) {
m_preferences.shouldReportAllAssertions = true;
}
- ~TAPReporter() override = default;
static std::string getDescription() {
using namespace std::string_literals;