Skip to content

Commit

Permalink
Always default empty destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Aug 5, 2023
1 parent ed4acde commit b593be2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/catch2/internal/catch_enum_values_registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace Catch {
return parsed;
}

EnumInfo::~EnumInfo() {}
EnumInfo::~EnumInfo() = default;

StringRef EnumInfo::lookup( int value ) const {
for( auto const& valueToName : m_values ) {
Expand Down
3 changes: 1 addition & 2 deletions src/catch2/internal/catch_exception_translator_registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ namespace Catch {
}
#endif //!defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)

ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() {
}
ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() = default;

void ExceptionTranslatorRegistry::registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator ) {
m_translators.push_back( CATCH_MOVE( translator ) );
Expand Down
2 changes: 1 addition & 1 deletion src/catch2/internal/catch_leak_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Catch {

#else // ^^ Windows crt debug heap enabled // Windows crt debug heap disabled vv

Catch::LeakDetector::LeakDetector() {}
Catch::LeakDetector::LeakDetector() = default;

#endif // CATCH_CONFIG_WINDOWS_CRTDBG

Expand Down
2 changes: 1 addition & 1 deletion src/catch2/internal/catch_tag_alias_registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Catch {

TagAliasRegistry::~TagAliasRegistry() {}
TagAliasRegistry::~TagAliasRegistry() = default;

TagAlias const* TagAliasRegistry::find( std::string const& alias ) const {
auto it = m_registry.find( alias );
Expand Down
2 changes: 1 addition & 1 deletion src/catch2/reporters/catch_reporter_automake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Catch {

AutomakeReporter::~AutomakeReporter() {}
AutomakeReporter::~AutomakeReporter() = default;

void AutomakeReporter::testCaseEnded(TestCaseStats const& _testCaseStats) {
// Possible values to emit are PASS, XFAIL, SKIP, FAIL, XPASS and ERROR.
Expand Down
2 changes: 1 addition & 1 deletion src/catch2/reporters/catch_reporter_compact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,6 @@ class AssertionPrinter {
StreamingReporterBase::testRunEnded( _testRunStats );
}

CompactReporter::~CompactReporter() {}
CompactReporter::~CompactReporter() = default;

} // end namespace Catch
2 changes: 1 addition & 1 deletion src/catch2/reporters/catch_reporter_teamcity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace Catch {
} // end anonymous namespace


TeamCityReporter::~TeamCityReporter() {}
TeamCityReporter::~TeamCityReporter() = default;

void TeamCityReporter::testRunStarting( TestRunInfo const& runInfo ) {
m_stream << "##teamcity[testSuiteStarted name='" << escape( runInfo.name )
Expand Down

0 comments on commit b593be2

Please sign in to comment.