Apply clang-tidy modernize-use-equals-default check

This commit is contained in:
Joe Loser
2018-06-02 22:26:44 -04:00
committed by Nik Bougalis
parent 3aaf6d7857
commit 5f8037c55b
41 changed files with 47 additions and 173 deletions

View File

@@ -440,9 +440,7 @@ private:
decltype(InboundLedgersImp::kReacquireInterval) decltype(InboundLedgersImp::kReacquireInterval)
InboundLedgersImp::kReacquireInterval{5}; InboundLedgersImp::kReacquireInterval{5};
InboundLedgers::~InboundLedgers() InboundLedgers::~InboundLedgers() = default;
{
}
std::unique_ptr<InboundLedgers> std::unique_ptr<InboundLedgers>
make_InboundLedgers (Application& app, make_InboundLedgers (Application& app,

View File

@@ -492,9 +492,7 @@ LedgerCleaner::LedgerCleaner (Stoppable& parent)
{ {
} }
LedgerCleaner::~LedgerCleaner () LedgerCleaner::~LedgerCleaner() = default;
{
}
std::unique_ptr<LedgerCleaner> std::unique_ptr<LedgerCleaner>
make_LedgerCleaner (Application& app, make_LedgerCleaner (Application& app,

View File

@@ -51,10 +51,6 @@ TransactionAcquire::TransactionAcquire (Application& app, uint256 const& hash, c
mMap->setUnbacked (); mMap->setUnbacked ();
} }
TransactionAcquire::~TransactionAcquire ()
{
}
void TransactionAcquire::execute () void TransactionAcquire::execute ()
{ {
app_.getJobQueue ().addJob ( app_.getJobQueue ().addJob (

View File

@@ -40,7 +40,7 @@ public:
public: public:
TransactionAcquire (Application& app, uint256 const& hash, clock_type& clock); TransactionAcquire (Application& app, uint256 const& hash, clock_type& clock);
~TransactionAcquire (); ~TransactionAcquire () = default;
std::shared_ptr<SHAMap> const& getMap () std::shared_ptr<SHAMap> const& getMap ()
{ {

View File

@@ -52,9 +52,7 @@ public:
m_groups = beast::insight::make_Groups (m_collector); m_groups = beast::insight::make_Groups (m_collector);
} }
~CollectorManagerImp () override ~CollectorManagerImp() = default;
{
}
beast::insight::Collector::ptr const& collector () override beast::insight::Collector::ptr const& collector () override
{ {
@@ -69,9 +67,7 @@ public:
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
CollectorManager::~CollectorManager () CollectorManager::~CollectorManager() = default;
{
}
std::unique_ptr<CollectorManager> CollectorManager::New(Section const& params, std::unique_ptr<CollectorManager> CollectorManager::New(Section const& params,
beast::Journal journal) beast::Journal journal)

View File

@@ -166,7 +166,7 @@ public:
TimeKeeper& timeKeeper, TimeKeeper& timeKeeper,
beast::Journal j, beast::Journal j,
boost::optional<std::size_t> minimumQuorum = boost::none); boost::optional<std::size_t> minimumQuorum = boost::none);
~ValidatorList (); ~ValidatorList () = default;
/** Load configured trusted keys. /** Load configured trusted keys.

View File

@@ -64,10 +64,6 @@ ValidatorList::ValidatorList (
{ {
} }
ValidatorList::~ValidatorList()
{
}
bool bool
ValidatorList::load ( ValidatorList::load (
PublicKey const& localSigningKey, PublicKey const& localSigningKey,

View File

@@ -82,7 +82,7 @@ public:
private: private:
CountedObjects (); CountedObjects ();
~CountedObjects (); ~CountedObjects () = default;
private: private:
std::atomic <int> m_count; std::atomic <int> m_count;

View File

@@ -86,7 +86,7 @@ private:
/** Destroy the object. /** Destroy the object.
If a system file is associated, it will be flushed and closed. 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. /** Determine if a system file is associated with the log.
@return `true` if a system file is associated and opened for @return `true` if a system file is associated and opened for

View File

@@ -34,10 +34,6 @@ CountedObjects::CountedObjects ()
{ {
} }
CountedObjects::~CountedObjects ()
{
}
CountedObjects::List CountedObjects::getCounts (int minimumThreshold) const CountedObjects::List CountedObjects::getCounts (int minimumThreshold) const
{ {
List counts; List counts;

View File

@@ -54,10 +54,6 @@ Logs::File::File()
{ {
} }
Logs::File::~File()
{
}
bool Logs::File::isOpen () const noexcept bool Logs::File::isOpen () const noexcept
{ {
return m_stream != nullptr; return m_stream != nullptr;

View File

@@ -388,8 +388,5 @@ std::unique_ptr<ResolverAsio> ResolverAsio::New (
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Resolver::~Resolver () Resolver::~Resolver() = default;
{
}
} }

View File

@@ -22,9 +22,6 @@
namespace beast { namespace beast {
namespace insight { namespace insight {
Collector::~Collector () Collector::~Collector() = default;
{
}
} }
} }

View File

@@ -45,9 +45,7 @@ public:
{ {
} }
~GroupImp () override ~GroupImp() = default;
{
}
std::string const& name () const override std::string const& name () const override
{ {
@@ -103,9 +101,7 @@ public:
{ {
} }
~GroupsImp () override ~GroupsImp() = default;
{
}
Group::ptr const& get (std::string const& name) override Group::ptr const& get (std::string const& name) override
{ {
@@ -122,9 +118,7 @@ public:
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Groups::~Groups () Groups::~Groups() = default;
{
}
std::unique_ptr <Groups> make_Groups (Collector::ptr const& collector) std::unique_ptr <Groups> make_Groups (Collector::ptr const& collector)
{ {

View File

@@ -22,9 +22,6 @@
namespace beast { namespace beast {
namespace insight { namespace insight {
HookImpl::~HookImpl () HookImpl::~HookImpl() = default;
{
}
} }
} }

View File

@@ -27,29 +27,16 @@
namespace beast { namespace beast {
namespace insight { namespace insight {
Base::~Base () Base::~Base() = default;
{
}
BaseImpl::~BaseImpl () BaseImpl::~BaseImpl() = default;
{
}
CounterImpl::~CounterImpl () CounterImpl::~CounterImpl() = default;
{
}
EventImpl::~EventImpl () EventImpl::~EventImpl() = default;
{
}
GaugeImpl::~GaugeImpl () GaugeImpl::~GaugeImpl() = default;
{
}
MeterImpl::~MeterImpl ()
{
}
MeterImpl::~MeterImpl() = default;
} }
} }

View File

@@ -103,13 +103,9 @@ class NullCollectorImp : public NullCollector
{ {
private: private:
public: public:
NullCollectorImp () NullCollectorImp() = default;
{
}
~NullCollectorImp () override ~NullCollectorImp() = default;
{
}
Hook make_hook (HookImpl::HandlerType const&) override Hook make_hook (HookImpl::HandlerType const&) override
{ {

View File

@@ -117,9 +117,9 @@ public:
StatsDEventImpl (std::string const& name, StatsDEventImpl (std::string const& name,
std::shared_ptr <StatsDCollectorImp> const& impl); std::shared_ptr <StatsDCollectorImp> 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_notify (EventImpl::value_type const& value);
void do_process (); void do_process ();
@@ -528,10 +528,6 @@ StatsDEventImpl::StatsDEventImpl (std::string const& name,
{ {
} }
StatsDEventImpl::~StatsDEventImpl ()
{
}
void StatsDEventImpl::notify (EventImpl::value_type const& value) void StatsDEventImpl::notify (EventImpl::value_type const& value)
{ {
m_impl->get_io_service().dispatch (std::bind ( m_impl->get_io_service().dispatch (std::bind (

View File

@@ -40,8 +40,8 @@ public:
class Set; class Set;
class Source; class Source;
PropertyStream (); PropertyStream () = default;
virtual ~PropertyStream (); virtual ~PropertyStream () = default;
protected: protected:
virtual void map_begin () = 0; virtual void map_begin () = 0;

View File

@@ -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 bool Journal::Sink::active (Severity level) const
{ {

View File

@@ -375,14 +375,6 @@ void PropertyStream::Source::onWrite (Map&)
// //
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
PropertyStream::PropertyStream ()
{
}
PropertyStream::~PropertyStream ()
{
}
void PropertyStream::add (std::string const& key, bool value) void PropertyStream::add (std::string const& key, bool value)
{ {
if (value) if (value)

View File

@@ -72,11 +72,6 @@ codePointToUTF8 (unsigned int cp)
// Class Reader // Class Reader
// ////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////
Reader::Reader ()
{
}
bool bool
Reader::parse ( std::string const& document, Reader::parse ( std::string const& document,
Value& root) Value& root)

View File

@@ -30,16 +30,10 @@ const Int Value::minInt = Int ( ~ (UInt (-1) / 2) );
const Int Value::maxInt = Int ( UInt (-1) / 2 ); const Int Value::maxInt = Int ( UInt (-1) / 2 );
const UInt Value::maxUInt = UInt (-1); const UInt Value::maxUInt = UInt (-1);
ValueAllocator::~ValueAllocator ()
{
}
class DefaultValueAllocator : public ValueAllocator class DefaultValueAllocator : public ValueAllocator
{ {
public: public:
~DefaultValueAllocator () override virtual ~DefaultValueAllocator() = default;
{
}
char* makeMemberName ( const char* memberName ) override char* makeMemberName ( const char* memberName ) override
{ {

View File

@@ -157,9 +157,6 @@ ValueIteratorBase::memberName () const
// ////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////
ValueConstIterator::ValueConstIterator ()
{
}
ValueConstIterator::ValueConstIterator ( const Value::ObjectValues::iterator& current ) ValueConstIterator::ValueConstIterator ( const Value::ObjectValues::iterator& current )
: ValueIteratorBase ( current ) : ValueIteratorBase ( current )
@@ -182,10 +179,6 @@ ValueConstIterator::operator = ( const ValueIteratorBase& other )
// ////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////
ValueIterator::ValueIterator ()
{
}
ValueIterator::ValueIterator ( const Value::ObjectValues::iterator& current ) ValueIterator::ValueIterator ( const Value::ObjectValues::iterator& current )
: ValueIteratorBase ( current ) : ValueIteratorBase ( current )

View File

@@ -181,9 +181,6 @@ std::string valueToQuotedString ( const char* value )
// Class FastWriter // Class FastWriter
// ////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////
FastWriter::FastWriter ()
{
}
std::string std::string
FastWriter::write ( const Value& root ) FastWriter::write ( const Value& root )

View File

@@ -42,7 +42,7 @@ public:
/** \brief Constructs a Reader allowing all features /** \brief Constructs a Reader allowing all features
* for parsing. * for parsing.
*/ */
Reader (); Reader () = default;
/** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document. /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
* \param document UTF-8 encoded string containing the document to read. * \param document UTF-8 encoded string containing the document to read.

View File

@@ -433,7 +433,7 @@ class ValueAllocator
public: public:
enum { unknown = (unsigned) - 1 }; enum { unknown = (unsigned) - 1 };
virtual ~ValueAllocator (); virtual ~ValueAllocator () = default;
virtual char* makeMemberName ( const char* memberName ) = 0; virtual char* makeMemberName ( const char* memberName ) = 0;
virtual void releaseMemberName ( char* memberName ) = 0; virtual void releaseMemberName ( char* memberName ) = 0;
@@ -512,7 +512,7 @@ public:
using pointer = const Value*; using pointer = const Value*;
using SelfType = ValueConstIterator; using SelfType = ValueConstIterator;
ValueConstIterator (); ValueConstIterator () = default;
private: private:
/*! \internal Use by Value to create an iterator. /*! \internal Use by Value to create an iterator.
*/ */
@@ -565,7 +565,7 @@ public:
using pointer = Value*; using pointer = Value*;
using SelfType = ValueIterator; using SelfType = ValueIterator;
ValueIterator (); ValueIterator () = default;
ValueIterator ( const ValueConstIterator& other ); ValueIterator ( const ValueConstIterator& other );
ValueIterator ( const ValueIterator& other ); ValueIterator ( const ValueIterator& other );
private: private:

View File

@@ -49,7 +49,7 @@ public:
class FastWriter : public WriterBase class FastWriter : public WriterBase
{ {
public: public:
FastWriter (); FastWriter () = default;
virtual ~FastWriter () {} virtual ~FastWriter () {}
public: // overridden from Writer public: // overridden from Writer

View File

@@ -638,9 +638,7 @@ CashDiff::CashDiff (CashDiff&& other)
{ {
} }
CashDiff::~CashDiff() CashDiff::~CashDiff() = default;
{
}
CashDiff::CashDiff (ReadView const& view, CashDiff::CashDiff (ReadView const& view,
CashFilter lhsFilter, detail::ApplyStateTable const& lhs, CashFilter lhsFilter, detail::ApplyStateTable const& lhs,

View File

@@ -68,9 +68,7 @@ public:
" path='" << mPath << "'"; " path='" << mPath << "'";
} }
~RPCSubImp () override ~RPCSubImp() = default;
{
}
void send (Json::Value const& jvObj, bool broadcast) override void send (Json::Value const& jvObj, bool broadcast) override
{ {

View File

@@ -29,8 +29,8 @@ namespace NodeStore {
class DummyScheduler : public Scheduler class DummyScheduler : public Scheduler
{ {
public: public:
DummyScheduler (); DummyScheduler () = default;
~DummyScheduler (); ~DummyScheduler () = default;
void scheduleTask (Task& task) override; void scheduleTask (Task& task) override;
void scheduledTasksStopped (); void scheduledTasksStopped ();
void onFetch (FetchReport const& report) override; void onFetch (FetchReport const& report) override;

View File

@@ -28,13 +28,9 @@ namespace NodeStore {
class NullBackend : public Backend class NullBackend : public Backend
{ {
public: public:
NullBackend () NullBackend() = default;
{
}
~NullBackend () override ~NullBackend() = default;
{
}
std::string std::string
getName() override getName() override

View File

@@ -22,14 +22,6 @@
namespace ripple { namespace ripple {
namespace NodeStore { namespace NodeStore {
DummyScheduler::DummyScheduler ()
{
}
DummyScheduler::~DummyScheduler ()
{
}
void void
DummyScheduler::scheduleTask (Task& task) DummyScheduler::scheduleTask (Task& task)
{ {

View File

@@ -39,14 +39,6 @@ ManagerImp::missing_backend()
); );
} }
ManagerImp::ManagerImp()
{
}
ManagerImp::~ManagerImp()
{
}
std::unique_ptr <Backend> std::unique_ptr <Backend>
ManagerImp::make_Backend ( ManagerImp::make_Backend (
Section const& parameters, Section const& parameters,

View File

@@ -40,9 +40,9 @@ public:
void void
missing_backend(); missing_backend();
ManagerImp(); ManagerImp() = default;
~ManagerImp(); ~ManagerImp() = default;
Factory* Factory*
find (std::string const& name) override; find (std::string const& name) override;

View File

@@ -44,8 +44,7 @@ struct get_peer_json
Json::Value json; Json::Value json;
get_peer_json () get_peer_json() = default;
{ }
void operator() (std::shared_ptr<Peer> const& peer) void operator() (std::shared_ptr<Peer> const& peer)
{ {

View File

@@ -53,9 +53,7 @@ PeerSet::PeerSet (Application& app, uint256 const& hash,
assert ((mTimerInterval > 10ms) && (mTimerInterval < 30s)); assert ((mTimerInterval > 10ms) && (mTimerInterval < 30s));
} }
PeerSet::~PeerSet () PeerSet::~PeerSet() = default;
{
}
bool PeerSet::insert (std::shared_ptr<Peer> const& ptr) bool PeerSet::insert (std::shared_ptr<Peer> const& ptr)
{ {

View File

@@ -89,9 +89,7 @@ SlotImp::activate (clock_type::time_point const& now)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Slot::~Slot () Slot::~Slot() = default;
{
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@@ -31,9 +31,7 @@ public:
{ {
} }
~SourceStringsImp () override ~SourceStringsImp() = default;
{
}
std::string const& name () override std::string const& name () override
{ {

View File

@@ -131,9 +131,7 @@ Manager::Manager ()
{ {
} }
Manager::~Manager () Manager::~Manager() = default;
{
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@@ -127,9 +127,7 @@ public:
{ {
} }
AllocT (AllocT const&) AllocT (AllocT const&) = default;
{
}
template <class U> template <class U>
AllocT (AllocT <U> const&) AllocT (AllocT <U> const&)