diff --git a/src/ripple/app/ledger/impl/InboundLedgers.cpp b/src/ripple/app/ledger/impl/InboundLedgers.cpp index 3ea9b3233..155460a04 100644 --- a/src/ripple/app/ledger/impl/InboundLedgers.cpp +++ b/src/ripple/app/ledger/impl/InboundLedgers.cpp @@ -440,9 +440,7 @@ private: decltype(InboundLedgersImp::kReacquireInterval) InboundLedgersImp::kReacquireInterval{5}; -InboundLedgers::~InboundLedgers() -{ -} +InboundLedgers::~InboundLedgers() = default; std::unique_ptr make_InboundLedgers (Application& app, diff --git a/src/ripple/app/ledger/impl/LedgerCleaner.cpp b/src/ripple/app/ledger/impl/LedgerCleaner.cpp index 0c7bc3668..f730f400d 100644 --- a/src/ripple/app/ledger/impl/LedgerCleaner.cpp +++ b/src/ripple/app/ledger/impl/LedgerCleaner.cpp @@ -492,9 +492,7 @@ LedgerCleaner::LedgerCleaner (Stoppable& parent) { } -LedgerCleaner::~LedgerCleaner () -{ -} +LedgerCleaner::~LedgerCleaner() = default; std::unique_ptr make_LedgerCleaner (Application& app, diff --git a/src/ripple/app/ledger/impl/TransactionAcquire.cpp b/src/ripple/app/ledger/impl/TransactionAcquire.cpp index e8900464d..369ba153c 100644 --- a/src/ripple/app/ledger/impl/TransactionAcquire.cpp +++ b/src/ripple/app/ledger/impl/TransactionAcquire.cpp @@ -51,10 +51,6 @@ TransactionAcquire::TransactionAcquire (Application& app, uint256 const& hash, c mMap->setUnbacked (); } -TransactionAcquire::~TransactionAcquire () -{ -} - void TransactionAcquire::execute () { app_.getJobQueue ().addJob ( diff --git a/src/ripple/app/ledger/impl/TransactionAcquire.h b/src/ripple/app/ledger/impl/TransactionAcquire.h index 58c81b2dd..81e03c9a5 100644 --- a/src/ripple/app/ledger/impl/TransactionAcquire.h +++ b/src/ripple/app/ledger/impl/TransactionAcquire.h @@ -40,7 +40,7 @@ public: public: TransactionAcquire (Application& app, uint256 const& hash, clock_type& clock); - ~TransactionAcquire (); + ~TransactionAcquire () = default; std::shared_ptr const& getMap () { diff --git a/src/ripple/app/main/CollectorManager.cpp b/src/ripple/app/main/CollectorManager.cpp index df12756c4..fdb481915 100644 --- a/src/ripple/app/main/CollectorManager.cpp +++ b/src/ripple/app/main/CollectorManager.cpp @@ -52,9 +52,7 @@ public: m_groups = beast::insight::make_Groups (m_collector); } - ~CollectorManagerImp () override - { - } + ~CollectorManagerImp() = default; beast::insight::Collector::ptr const& collector () override { @@ -69,9 +67,7 @@ public: //------------------------------------------------------------------------------ -CollectorManager::~CollectorManager () -{ -} +CollectorManager::~CollectorManager() = default; std::unique_ptr CollectorManager::New(Section const& params, beast::Journal journal) diff --git a/src/ripple/app/misc/ValidatorList.h b/src/ripple/app/misc/ValidatorList.h index 1bc70b976..6bfba350c 100644 --- a/src/ripple/app/misc/ValidatorList.h +++ b/src/ripple/app/misc/ValidatorList.h @@ -166,7 +166,7 @@ public: TimeKeeper& timeKeeper, beast::Journal j, boost::optional minimumQuorum = boost::none); - ~ValidatorList (); + ~ValidatorList () = default; /** Load configured trusted keys. diff --git a/src/ripple/app/misc/impl/ValidatorList.cpp b/src/ripple/app/misc/impl/ValidatorList.cpp index 2c51689a1..7329632fb 100644 --- a/src/ripple/app/misc/impl/ValidatorList.cpp +++ b/src/ripple/app/misc/impl/ValidatorList.cpp @@ -64,10 +64,6 @@ ValidatorList::ValidatorList ( { } -ValidatorList::~ValidatorList() -{ -} - bool ValidatorList::load ( PublicKey const& localSigningKey, diff --git a/src/ripple/basics/CountedObject.h b/src/ripple/basics/CountedObject.h index e402ee0ab..8b52eeb7d 100644 --- a/src/ripple/basics/CountedObject.h +++ b/src/ripple/basics/CountedObject.h @@ -82,7 +82,7 @@ public: private: CountedObjects (); - ~CountedObjects (); + ~CountedObjects () = default; private: std::atomic m_count; diff --git a/src/ripple/basics/Log.h b/src/ripple/basics/Log.h index 9a3ccc965..9f93ef53e 100644 --- a/src/ripple/basics/Log.h +++ b/src/ripple/basics/Log.h @@ -86,7 +86,7 @@ private: /** Destroy the object. If a system file is associated, it will be flushed and closed. */ - ~File (); + ~File () = default; /** Determine if a system file is associated with the log. @return `true` if a system file is associated and opened for diff --git a/src/ripple/basics/impl/CountedObject.cpp b/src/ripple/basics/impl/CountedObject.cpp index faf13942a..752ccaf42 100644 --- a/src/ripple/basics/impl/CountedObject.cpp +++ b/src/ripple/basics/impl/CountedObject.cpp @@ -34,10 +34,6 @@ CountedObjects::CountedObjects () { } -CountedObjects::~CountedObjects () -{ -} - CountedObjects::List CountedObjects::getCounts (int minimumThreshold) const { List counts; diff --git a/src/ripple/basics/impl/Log.cpp b/src/ripple/basics/impl/Log.cpp index 8131afa4a..3bd9ba6e2 100644 --- a/src/ripple/basics/impl/Log.cpp +++ b/src/ripple/basics/impl/Log.cpp @@ -54,10 +54,6 @@ Logs::File::File() { } -Logs::File::~File() -{ -} - bool Logs::File::isOpen () const noexcept { return m_stream != nullptr; diff --git a/src/ripple/basics/impl/ResolverAsio.cpp b/src/ripple/basics/impl/ResolverAsio.cpp index 4b85af785..6dfc2e550 100644 --- a/src/ripple/basics/impl/ResolverAsio.cpp +++ b/src/ripple/basics/impl/ResolverAsio.cpp @@ -388,8 +388,5 @@ std::unique_ptr ResolverAsio::New ( } //----------------------------------------------------------------------------- -Resolver::~Resolver () -{ -} - +Resolver::~Resolver() = default; } diff --git a/src/ripple/beast/insight/impl/Collector.cpp b/src/ripple/beast/insight/impl/Collector.cpp index faa54e022..69ff2b236 100644 --- a/src/ripple/beast/insight/impl/Collector.cpp +++ b/src/ripple/beast/insight/impl/Collector.cpp @@ -22,9 +22,6 @@ namespace beast { namespace insight { -Collector::~Collector () -{ -} - +Collector::~Collector() = default; } } diff --git a/src/ripple/beast/insight/impl/Groups.cpp b/src/ripple/beast/insight/impl/Groups.cpp index 63572de04..5ea733b33 100644 --- a/src/ripple/beast/insight/impl/Groups.cpp +++ b/src/ripple/beast/insight/impl/Groups.cpp @@ -45,9 +45,7 @@ public: { } - ~GroupImp () override - { - } + ~GroupImp() = default; std::string const& name () const override { @@ -103,9 +101,7 @@ public: { } - ~GroupsImp () override - { - } + ~GroupsImp() = default; Group::ptr const& get (std::string const& name) override { @@ -122,9 +118,7 @@ public: //------------------------------------------------------------------------------ -Groups::~Groups () -{ -} +Groups::~Groups() = default; std::unique_ptr make_Groups (Collector::ptr const& collector) { diff --git a/src/ripple/beast/insight/impl/Hook.cpp b/src/ripple/beast/insight/impl/Hook.cpp index d45369b76..157d09776 100644 --- a/src/ripple/beast/insight/impl/Hook.cpp +++ b/src/ripple/beast/insight/impl/Hook.cpp @@ -22,9 +22,6 @@ namespace beast { namespace insight { -HookImpl::~HookImpl () -{ -} - +HookImpl::~HookImpl() = default; } } diff --git a/src/ripple/beast/insight/impl/Metric.cpp b/src/ripple/beast/insight/impl/Metric.cpp index 168d51c47..878d12c3e 100644 --- a/src/ripple/beast/insight/impl/Metric.cpp +++ b/src/ripple/beast/insight/impl/Metric.cpp @@ -27,29 +27,16 @@ namespace beast { namespace insight { -Base::~Base () -{ -} +Base::~Base() = default; -BaseImpl::~BaseImpl () -{ -} +BaseImpl::~BaseImpl() = default; -CounterImpl::~CounterImpl () -{ -} +CounterImpl::~CounterImpl() = default; -EventImpl::~EventImpl () -{ -} +EventImpl::~EventImpl() = default; -GaugeImpl::~GaugeImpl () -{ -} - -MeterImpl::~MeterImpl () -{ -} +GaugeImpl::~GaugeImpl() = default; +MeterImpl::~MeterImpl() = default; } } diff --git a/src/ripple/beast/insight/impl/NullCollector.cpp b/src/ripple/beast/insight/impl/NullCollector.cpp index ed9b18841..be2d612f7 100644 --- a/src/ripple/beast/insight/impl/NullCollector.cpp +++ b/src/ripple/beast/insight/impl/NullCollector.cpp @@ -103,13 +103,9 @@ class NullCollectorImp : public NullCollector { private: public: - NullCollectorImp () - { - } + NullCollectorImp() = default; - ~NullCollectorImp () override - { - } + ~NullCollectorImp() = default; Hook make_hook (HookImpl::HandlerType const&) override { diff --git a/src/ripple/beast/insight/impl/StatsDCollector.cpp b/src/ripple/beast/insight/impl/StatsDCollector.cpp index 52646bb7d..6f72bb531 100644 --- a/src/ripple/beast/insight/impl/StatsDCollector.cpp +++ b/src/ripple/beast/insight/impl/StatsDCollector.cpp @@ -117,9 +117,9 @@ public: StatsDEventImpl (std::string const& name, std::shared_ptr const& impl); - ~StatsDEventImpl () override; + ~StatsDEventImpl () = default; - void notify (EventImpl::value_type const& alue) override; + void notify (EventImpl::value_type const& value) override; void do_notify (EventImpl::value_type const& value); void do_process (); @@ -528,10 +528,6 @@ StatsDEventImpl::StatsDEventImpl (std::string const& name, { } -StatsDEventImpl::~StatsDEventImpl () -{ -} - void StatsDEventImpl::notify (EventImpl::value_type const& value) { m_impl->get_io_service().dispatch (std::bind ( diff --git a/src/ripple/beast/utility/PropertyStream.h b/src/ripple/beast/utility/PropertyStream.h index b9bf1dc14..b11c1bffe 100644 --- a/src/ripple/beast/utility/PropertyStream.h +++ b/src/ripple/beast/utility/PropertyStream.h @@ -40,8 +40,8 @@ public: class Set; class Source; - PropertyStream (); - virtual ~PropertyStream (); + PropertyStream () = default; + virtual ~PropertyStream () = default; protected: virtual void map_begin () = 0; diff --git a/src/ripple/beast/utility/src/beast_Journal.cpp b/src/ripple/beast/utility/src/beast_Journal.cpp index 3b9aaaee9..ec74e0d8e 100644 --- a/src/ripple/beast/utility/src/beast_Journal.cpp +++ b/src/ripple/beast/utility/src/beast_Journal.cpp @@ -78,9 +78,7 @@ Journal::Sink::Sink (Severity thresh, bool console) { } -Journal::Sink::~Sink () -{ -} +Journal::Sink::~Sink() = default; bool Journal::Sink::active (Severity level) const { diff --git a/src/ripple/beast/utility/src/beast_PropertyStream.cpp b/src/ripple/beast/utility/src/beast_PropertyStream.cpp index a9a8ad9df..4d49fc9b9 100644 --- a/src/ripple/beast/utility/src/beast_PropertyStream.cpp +++ b/src/ripple/beast/utility/src/beast_PropertyStream.cpp @@ -375,14 +375,6 @@ void PropertyStream::Source::onWrite (Map&) // //------------------------------------------------------------------------------ -PropertyStream::PropertyStream () -{ -} - -PropertyStream::~PropertyStream () -{ -} - void PropertyStream::add (std::string const& key, bool value) { if (value) diff --git a/src/ripple/json/impl/json_reader.cpp b/src/ripple/json/impl/json_reader.cpp index ecf5d9831..ef1b2b8a7 100644 --- a/src/ripple/json/impl/json_reader.cpp +++ b/src/ripple/json/impl/json_reader.cpp @@ -72,11 +72,6 @@ codePointToUTF8 (unsigned int cp) // Class Reader // ////////////////////////////////////////////////////////////////// -Reader::Reader () -{ -} - - bool Reader::parse ( std::string const& document, Value& root) diff --git a/src/ripple/json/impl/json_value.cpp b/src/ripple/json/impl/json_value.cpp index 4c5036fef..81327f09d 100644 --- a/src/ripple/json/impl/json_value.cpp +++ b/src/ripple/json/impl/json_value.cpp @@ -30,16 +30,10 @@ const Int Value::minInt = Int ( ~ (UInt (-1) / 2) ); const Int Value::maxInt = Int ( UInt (-1) / 2 ); const UInt Value::maxUInt = UInt (-1); -ValueAllocator::~ValueAllocator () -{ -} - class DefaultValueAllocator : public ValueAllocator { public: - ~DefaultValueAllocator () override - { - } + virtual ~DefaultValueAllocator() = default; char* makeMemberName ( const char* memberName ) override { diff --git a/src/ripple/json/impl/json_valueiterator.cpp b/src/ripple/json/impl/json_valueiterator.cpp index 8b94182a0..3098a8fc3 100644 --- a/src/ripple/json/impl/json_valueiterator.cpp +++ b/src/ripple/json/impl/json_valueiterator.cpp @@ -157,9 +157,6 @@ ValueIteratorBase::memberName () const // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// -ValueConstIterator::ValueConstIterator () -{ -} ValueConstIterator::ValueConstIterator ( const Value::ObjectValues::iterator& current ) : ValueIteratorBase ( current ) @@ -182,10 +179,6 @@ ValueConstIterator::operator = ( const ValueIteratorBase& other ) // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// -ValueIterator::ValueIterator () -{ -} - ValueIterator::ValueIterator ( const Value::ObjectValues::iterator& current ) : ValueIteratorBase ( current ) diff --git a/src/ripple/json/impl/json_writer.cpp b/src/ripple/json/impl/json_writer.cpp index e313abf41..2fe0eb8de 100644 --- a/src/ripple/json/impl/json_writer.cpp +++ b/src/ripple/json/impl/json_writer.cpp @@ -181,9 +181,6 @@ std::string valueToQuotedString ( const char* value ) // Class FastWriter // ////////////////////////////////////////////////////////////////// -FastWriter::FastWriter () -{ -} std::string FastWriter::write ( const Value& root ) diff --git a/src/ripple/json/json_reader.h b/src/ripple/json/json_reader.h index 800f110e9..0ec4cdbe0 100644 --- a/src/ripple/json/json_reader.h +++ b/src/ripple/json/json_reader.h @@ -42,7 +42,7 @@ public: /** \brief Constructs a Reader allowing all features * for parsing. */ - Reader (); + Reader () = default; /** \brief Read a Value from a JSON document. * \param document UTF-8 encoded string containing the document to read. diff --git a/src/ripple/json/json_value.h b/src/ripple/json/json_value.h index 0aefe26d7..1e5ca6910 100644 --- a/src/ripple/json/json_value.h +++ b/src/ripple/json/json_value.h @@ -433,7 +433,7 @@ class ValueAllocator public: enum { unknown = (unsigned) - 1 }; - virtual ~ValueAllocator (); + virtual ~ValueAllocator () = default; virtual char* makeMemberName ( const char* memberName ) = 0; virtual void releaseMemberName ( char* memberName ) = 0; @@ -512,7 +512,7 @@ public: using pointer = const Value*; using SelfType = ValueConstIterator; - ValueConstIterator (); + ValueConstIterator () = default; private: /*! \internal Use by Value to create an iterator. */ @@ -565,7 +565,7 @@ public: using pointer = Value*; using SelfType = ValueIterator; - ValueIterator (); + ValueIterator () = default; ValueIterator ( const ValueConstIterator& other ); ValueIterator ( const ValueIterator& other ); private: diff --git a/src/ripple/json/json_writer.h b/src/ripple/json/json_writer.h index ed3d80980..c2009830d 100644 --- a/src/ripple/json/json_writer.h +++ b/src/ripple/json/json_writer.h @@ -49,7 +49,7 @@ public: class FastWriter : public WriterBase { public: - FastWriter (); + FastWriter () = default; virtual ~FastWriter () {} public: // overridden from Writer diff --git a/src/ripple/ledger/impl/CashDiff.cpp b/src/ripple/ledger/impl/CashDiff.cpp index e92cda586..873de8675 100644 --- a/src/ripple/ledger/impl/CashDiff.cpp +++ b/src/ripple/ledger/impl/CashDiff.cpp @@ -638,9 +638,7 @@ CashDiff::CashDiff (CashDiff&& other) { } -CashDiff::~CashDiff() -{ -} +CashDiff::~CashDiff() = default; CashDiff::CashDiff (ReadView const& view, CashFilter lhsFilter, detail::ApplyStateTable const& lhs, diff --git a/src/ripple/net/impl/RPCSub.cpp b/src/ripple/net/impl/RPCSub.cpp index a68db408a..57a2361d4 100644 --- a/src/ripple/net/impl/RPCSub.cpp +++ b/src/ripple/net/impl/RPCSub.cpp @@ -68,9 +68,7 @@ public: " path='" << mPath << "'"; } - ~RPCSubImp () override - { - } + ~RPCSubImp() = default; void send (Json::Value const& jvObj, bool broadcast) override { diff --git a/src/ripple/nodestore/DummyScheduler.h b/src/ripple/nodestore/DummyScheduler.h index 291d3aa69..595edbfeb 100644 --- a/src/ripple/nodestore/DummyScheduler.h +++ b/src/ripple/nodestore/DummyScheduler.h @@ -29,8 +29,8 @@ namespace NodeStore { class DummyScheduler : public Scheduler { public: - DummyScheduler (); - ~DummyScheduler (); + DummyScheduler () = default; + ~DummyScheduler () = default; void scheduleTask (Task& task) override; void scheduledTasksStopped (); void onFetch (FetchReport const& report) override; diff --git a/src/ripple/nodestore/backend/NullFactory.cpp b/src/ripple/nodestore/backend/NullFactory.cpp index 3eef00e8b..583367210 100644 --- a/src/ripple/nodestore/backend/NullFactory.cpp +++ b/src/ripple/nodestore/backend/NullFactory.cpp @@ -28,13 +28,9 @@ namespace NodeStore { class NullBackend : public Backend { public: - NullBackend () - { - } + NullBackend() = default; - ~NullBackend () override - { - } + ~NullBackend() = default; std::string getName() override diff --git a/src/ripple/nodestore/impl/DummyScheduler.cpp b/src/ripple/nodestore/impl/DummyScheduler.cpp index be4b4d480..adbb4d405 100644 --- a/src/ripple/nodestore/impl/DummyScheduler.cpp +++ b/src/ripple/nodestore/impl/DummyScheduler.cpp @@ -22,14 +22,6 @@ namespace ripple { namespace NodeStore { -DummyScheduler::DummyScheduler () -{ -} - -DummyScheduler::~DummyScheduler () -{ -} - void DummyScheduler::scheduleTask (Task& task) { diff --git a/src/ripple/nodestore/impl/ManagerImp.cpp b/src/ripple/nodestore/impl/ManagerImp.cpp index b8ced70dc..dc38a0c07 100644 --- a/src/ripple/nodestore/impl/ManagerImp.cpp +++ b/src/ripple/nodestore/impl/ManagerImp.cpp @@ -39,14 +39,6 @@ ManagerImp::missing_backend() ); } -ManagerImp::ManagerImp() -{ -} - -ManagerImp::~ManagerImp() -{ -} - std::unique_ptr ManagerImp::make_Backend ( Section const& parameters, diff --git a/src/ripple/nodestore/impl/ManagerImp.h b/src/ripple/nodestore/impl/ManagerImp.h index 13c8e4607..f8b3880df 100644 --- a/src/ripple/nodestore/impl/ManagerImp.h +++ b/src/ripple/nodestore/impl/ManagerImp.h @@ -40,9 +40,9 @@ public: void missing_backend(); - ManagerImp(); + ManagerImp() = default; - ~ManagerImp(); + ~ManagerImp() = default; Factory* find (std::string const& name) override; diff --git a/src/ripple/overlay/impl/OverlayImpl.cpp b/src/ripple/overlay/impl/OverlayImpl.cpp index 7ab41607a..08b11eb6e 100644 --- a/src/ripple/overlay/impl/OverlayImpl.cpp +++ b/src/ripple/overlay/impl/OverlayImpl.cpp @@ -44,8 +44,7 @@ struct get_peer_json Json::Value json; - get_peer_json () - { } + get_peer_json() = default; void operator() (std::shared_ptr const& peer) { diff --git a/src/ripple/overlay/impl/PeerSet.cpp b/src/ripple/overlay/impl/PeerSet.cpp index 833ac7b2b..086434f0f 100644 --- a/src/ripple/overlay/impl/PeerSet.cpp +++ b/src/ripple/overlay/impl/PeerSet.cpp @@ -53,9 +53,7 @@ PeerSet::PeerSet (Application& app, uint256 const& hash, assert ((mTimerInterval > 10ms) && (mTimerInterval < 30s)); } -PeerSet::~PeerSet () -{ -} +PeerSet::~PeerSet() = default; bool PeerSet::insert (std::shared_ptr const& ptr) { diff --git a/src/ripple/peerfinder/impl/SlotImp.cpp b/src/ripple/peerfinder/impl/SlotImp.cpp index a8d7a3848..9c608558c 100644 --- a/src/ripple/peerfinder/impl/SlotImp.cpp +++ b/src/ripple/peerfinder/impl/SlotImp.cpp @@ -89,9 +89,7 @@ SlotImp::activate (clock_type::time_point const& now) //------------------------------------------------------------------------------ -Slot::~Slot () -{ -} +Slot::~Slot() = default; //------------------------------------------------------------------------------ diff --git a/src/ripple/peerfinder/impl/SourceStrings.cpp b/src/ripple/peerfinder/impl/SourceStrings.cpp index ae86685f1..5a369c317 100644 --- a/src/ripple/peerfinder/impl/SourceStrings.cpp +++ b/src/ripple/peerfinder/impl/SourceStrings.cpp @@ -31,9 +31,7 @@ public: { } - ~SourceStringsImp () override - { - } + ~SourceStringsImp() = default; std::string const& name () override { diff --git a/src/ripple/resource/impl/ResourceManager.cpp b/src/ripple/resource/impl/ResourceManager.cpp index 9bc067236..8c5cbd63e 100644 --- a/src/ripple/resource/impl/ResourceManager.cpp +++ b/src/ripple/resource/impl/ResourceManager.cpp @@ -131,9 +131,7 @@ Manager::Manager () { } -Manager::~Manager () -{ -} +Manager::~Manager() = default; //------------------------------------------------------------------------------ diff --git a/src/test/beast/aged_associative_container_test.cpp b/src/test/beast/aged_associative_container_test.cpp index f62014684..ab68d51ad 100644 --- a/src/test/beast/aged_associative_container_test.cpp +++ b/src/test/beast/aged_associative_container_test.cpp @@ -127,9 +127,7 @@ public: { } - AllocT (AllocT const&) - { - } + AllocT (AllocT const&) = default; template AllocT (AllocT const&)