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)
InboundLedgersImp::kReacquireInterval{5};
InboundLedgers::~InboundLedgers()
{
}
InboundLedgers::~InboundLedgers() = default;
std::unique_ptr<InboundLedgers>
make_InboundLedgers (Application& app,

View File

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

View File

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

View File

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

View File

@@ -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> CollectorManager::New(Section const& params,
beast::Journal journal)

View File

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

View File

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

View File

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

View File

@@ -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

View File

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

View File

@@ -54,10 +54,6 @@ Logs::File::File()
{
}
Logs::File::~File()
{
}
bool Logs::File::isOpen () const noexcept
{
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 insight {
Collector::~Collector ()
{
}
Collector::~Collector() = default;
}
}

View File

@@ -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 <Groups> make_Groups (Collector::ptr const& collector)
{

View File

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

View File

@@ -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;
}
}

View File

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

View File

@@ -117,9 +117,9 @@ public:
StatsDEventImpl (std::string const& name,
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_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 (

View File

@@ -40,8 +40,8 @@ public:
class Set;
class Source;
PropertyStream ();
virtual ~PropertyStream ();
PropertyStream () = default;
virtual ~PropertyStream () = default;
protected:
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
{

View File

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

View File

@@ -72,11 +72,6 @@ codePointToUTF8 (unsigned int cp)
// Class Reader
// //////////////////////////////////////////////////////////////////
Reader::Reader ()
{
}
bool
Reader::parse ( std::string const& document,
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 UInt Value::maxUInt = UInt (-1);
ValueAllocator::~ValueAllocator ()
{
}
class DefaultValueAllocator : public ValueAllocator
{
public:
~DefaultValueAllocator () override
{
}
virtual ~DefaultValueAllocator() = default;
char* makeMemberName ( const char* memberName ) override
{

View File

@@ -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 )

View File

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

View File

@@ -42,7 +42,7 @@ public:
/** \brief Constructs a Reader allowing all features
* for parsing.
*/
Reader ();
Reader () = default;
/** \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.

View File

@@ -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:

View File

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

View File

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

View File

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

View File

@@ -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;

View File

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

View File

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

View File

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

View File

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

View File

@@ -44,8 +44,7 @@ struct get_peer_json
Json::Value json;
get_peer_json ()
{ }
get_peer_json() = default;
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));
}
PeerSet::~PeerSet ()
{
}
PeerSet::~PeerSet() = default;
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
{

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>
AllocT (AllocT <U> const&)