Replace empty virtual destructors with =default
This commit is contained in:
parent
551412128c
commit
158a1a71fc
7 changed files with 20 additions and 80 deletions
|
@ -37,10 +37,6 @@ bool rai::from_string_hex (std::string const & value_a, uint64_t & target_a)
|
|||
return result;
|
||||
}
|
||||
|
||||
rai::block::~block ()
|
||||
{
|
||||
}
|
||||
|
||||
std::string rai::block::to_json ()
|
||||
{
|
||||
std::string result;
|
||||
|
@ -1116,23 +1112,3 @@ void rai::receive_hashables::hash (blake2b_state & hash_a) const
|
|||
blake2b_update (&hash_a, previous.bytes.data (), sizeof (previous.bytes));
|
||||
blake2b_update (&hash_a, source.bytes.data (), sizeof (source.bytes));
|
||||
}
|
||||
|
||||
rai::block_visitor::~block_visitor ()
|
||||
{
|
||||
}
|
||||
|
||||
rai::open_block::~open_block ()
|
||||
{
|
||||
}
|
||||
|
||||
rai::change_block::~change_block ()
|
||||
{
|
||||
}
|
||||
|
||||
rai::send_block::~send_block ()
|
||||
{
|
||||
}
|
||||
|
||||
rai::receive_block::~receive_block ()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
virtual bool operator== (rai::block const &) const = 0;
|
||||
virtual rai::block_type type () const = 0;
|
||||
virtual void signature_set (rai::uint512_union const &) = 0;
|
||||
virtual ~block ();
|
||||
virtual ~block () = default;
|
||||
};
|
||||
class send_hashables
|
||||
{
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
send_block (rai::block_hash const &, rai::account const &, rai::amount const &, rai::raw_key const &, rai::public_key const &, uint64_t);
|
||||
send_block (bool &, rai::stream &);
|
||||
send_block (bool &, boost::property_tree::ptree const &);
|
||||
virtual ~send_block ();
|
||||
virtual ~send_block () = default;
|
||||
using rai::block::hash;
|
||||
void hash (blake2b_state &) const override;
|
||||
uint64_t block_work () const override;
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
receive_block (rai::block_hash const &, rai::block_hash const &, rai::raw_key const &, rai::public_key const &, uint64_t);
|
||||
receive_block (bool &, rai::stream &);
|
||||
receive_block (bool &, boost::property_tree::ptree const &);
|
||||
virtual ~receive_block ();
|
||||
virtual ~receive_block () = default;
|
||||
using rai::block::hash;
|
||||
void hash (blake2b_state &) const override;
|
||||
uint64_t block_work () const override;
|
||||
|
@ -159,7 +159,7 @@ public:
|
|||
open_block (rai::block_hash const &, rai::account const &, rai::account const &, std::nullptr_t);
|
||||
open_block (bool &, rai::stream &);
|
||||
open_block (bool &, boost::property_tree::ptree const &);
|
||||
virtual ~open_block ();
|
||||
virtual ~open_block () = default;
|
||||
using rai::block::hash;
|
||||
void hash (blake2b_state &) const override;
|
||||
uint64_t block_work () const override;
|
||||
|
@ -198,7 +198,7 @@ public:
|
|||
change_block (rai::block_hash const &, rai::account const &, rai::raw_key const &, rai::public_key const &, uint64_t);
|
||||
change_block (bool &, rai::stream &);
|
||||
change_block (bool &, boost::property_tree::ptree const &);
|
||||
virtual ~change_block ();
|
||||
virtual ~change_block () = default;
|
||||
using rai::block::hash;
|
||||
void hash (blake2b_state &) const override;
|
||||
uint64_t block_work () const override;
|
||||
|
@ -228,7 +228,7 @@ public:
|
|||
virtual void receive_block (rai::receive_block const &) = 0;
|
||||
virtual void open_block (rai::open_block const &) = 0;
|
||||
virtual void change_block (rai::change_block const &) = 0;
|
||||
virtual ~block_visitor ();
|
||||
virtual ~block_visitor () = default;
|
||||
};
|
||||
std::unique_ptr<rai::block> deserialize_block (rai::stream &);
|
||||
std::unique_ptr<rai::block> deserialize_block (rai::stream &, rai::block_type);
|
||||
|
|
|
@ -18,10 +18,6 @@ log (log_a)
|
|||
{
|
||||
}
|
||||
|
||||
rai::block_synchronization::~block_synchronization ()
|
||||
{
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
class add_dependency_visitor : public rai::block_visitor
|
||||
|
@ -138,10 +134,6 @@ node (node_a)
|
|||
{
|
||||
}
|
||||
|
||||
rai::push_synchronization::~push_synchronization ()
|
||||
{
|
||||
}
|
||||
|
||||
bool rai::push_synchronization::synchronized (MDB_txn * transaction_a, rai::block_hash const & hash_a)
|
||||
{
|
||||
auto result (!node.store.unsynced_exists (transaction_a, hash_a));
|
||||
|
@ -1531,9 +1523,7 @@ public:
|
|||
connection (connection_a)
|
||||
{
|
||||
}
|
||||
virtual ~request_response_visitor ()
|
||||
{
|
||||
}
|
||||
virtual ~request_response_visitor () = default;
|
||||
void keepalive (rai::keepalive const &) override
|
||||
{
|
||||
assert (false);
|
||||
|
|
|
@ -32,7 +32,7 @@ class block_synchronization
|
|||
{
|
||||
public:
|
||||
block_synchronization (boost::log::sources::logger_mt &);
|
||||
virtual ~block_synchronization ();
|
||||
virtual ~block_synchronization () = default;
|
||||
// Return true if target already has block
|
||||
virtual bool synchronized (MDB_txn *, rai::block_hash const &) = 0;
|
||||
virtual std::unique_ptr<rai::block> retrieve (MDB_txn *, rai::block_hash const &) = 0;
|
||||
|
@ -49,7 +49,7 @@ class push_synchronization : public rai::block_synchronization
|
|||
{
|
||||
public:
|
||||
push_synchronization (rai::node &, std::function<rai::sync_result (MDB_txn *, rai::block const &)> const &);
|
||||
virtual ~push_synchronization ();
|
||||
virtual ~push_synchronization () = default;
|
||||
bool synchronized (MDB_txn *, rai::block_hash const &) override;
|
||||
std::unique_ptr<rai::block> retrieve (MDB_txn *, rai::block_hash const &) override;
|
||||
rai::sync_result target (MDB_txn *, rai::block const &) override;
|
||||
|
|
|
@ -323,9 +323,7 @@ public:
|
|||
sender (sender_a)
|
||||
{
|
||||
}
|
||||
virtual ~network_message_visitor ()
|
||||
{
|
||||
}
|
||||
virtual ~network_message_visitor () = default;
|
||||
void keepalive (rai::keepalive const & message_a) override
|
||||
{
|
||||
if (node.config.logging.network_keepalive_logging ())
|
||||
|
@ -584,7 +582,7 @@ void rai::logging::serialize_json (boost::property_tree::ptree & tree_a) const
|
|||
tree_a.put ("work_generation_time", work_generation_time_value);
|
||||
tree_a.put ("log_to_cerr", log_to_cerr_value);
|
||||
tree_a.put ("max_size", max_size);
|
||||
tree_a.put("rotation_size", rotation_size);
|
||||
tree_a.put ("rotation_size", rotation_size);
|
||||
tree_a.put ("flush", flush);
|
||||
}
|
||||
|
||||
|
@ -2217,9 +2215,7 @@ public:
|
|||
block (block_a)
|
||||
{
|
||||
}
|
||||
virtual ~confirmed_visitor ()
|
||||
{
|
||||
}
|
||||
virtual ~confirmed_visitor () = default;
|
||||
void send_block (rai::send_block const & block_a) override
|
||||
{
|
||||
for (auto i (node.wallets.items.begin ()), n (node.wallets.items.end ()); i != n; ++i)
|
||||
|
|
|
@ -1546,9 +1546,7 @@ public:
|
|||
hash (hash_a)
|
||||
{
|
||||
}
|
||||
virtual ~history_visitor ()
|
||||
{
|
||||
}
|
||||
virtual ~history_visitor () = default;
|
||||
void send_block (rai::send_block const & block_a)
|
||||
{
|
||||
tree.put ("type", "send");
|
||||
|
|
|
@ -594,9 +594,7 @@ public:
|
|||
result (0)
|
||||
{
|
||||
}
|
||||
virtual ~representative_visitor ()
|
||||
{
|
||||
}
|
||||
virtual ~representative_visitor () = default;
|
||||
void compute (rai::block_hash const & hash_a)
|
||||
{
|
||||
current = hash_a;
|
||||
|
@ -802,9 +800,7 @@ public:
|
|||
store (store_a)
|
||||
{
|
||||
}
|
||||
virtual ~set_predecessor ()
|
||||
{
|
||||
}
|
||||
virtual ~set_predecessor () = default;
|
||||
void fill_value (rai::block const & block_a)
|
||||
{
|
||||
auto hash (block_a.hash ());
|
||||
|
@ -1731,9 +1727,7 @@ public:
|
|||
store (store_a)
|
||||
{
|
||||
}
|
||||
virtual ~root_visitor ()
|
||||
{
|
||||
}
|
||||
virtual ~root_visitor () = default;
|
||||
void send_block (rai::send_block const & block_a) override
|
||||
{
|
||||
result = block_a.previous ();
|
||||
|
@ -1798,7 +1792,7 @@ class ledger_processor : public rai::block_visitor
|
|||
{
|
||||
public:
|
||||
ledger_processor (rai::ledger &, MDB_txn *);
|
||||
virtual ~ledger_processor ();
|
||||
virtual ~ledger_processor () = default;
|
||||
void send_block (rai::send_block const &) override;
|
||||
void receive_block (rai::receive_block const &) override;
|
||||
void open_block (rai::open_block const &) override;
|
||||
|
@ -1813,7 +1807,7 @@ class amount_visitor : public rai::block_visitor
|
|||
{
|
||||
public:
|
||||
amount_visitor (MDB_txn *, rai::block_store &);
|
||||
virtual ~amount_visitor ();
|
||||
virtual ~amount_visitor () = default;
|
||||
void compute (rai::block_hash const &);
|
||||
void send_block (rai::send_block const &) override;
|
||||
void receive_block (rai::receive_block const &) override;
|
||||
|
@ -1830,7 +1824,7 @@ class balance_visitor : public rai::block_visitor
|
|||
{
|
||||
public:
|
||||
balance_visitor (MDB_txn *, rai::block_store &);
|
||||
virtual ~balance_visitor ();
|
||||
virtual ~balance_visitor () = default;
|
||||
void compute (rai::block_hash const &);
|
||||
void send_block (rai::send_block const &) override;
|
||||
void receive_block (rai::receive_block const &) override;
|
||||
|
@ -1848,10 +1842,6 @@ store (store_a)
|
|||
{
|
||||
}
|
||||
|
||||
amount_visitor::~amount_visitor ()
|
||||
{
|
||||
}
|
||||
|
||||
void amount_visitor::send_block (rai::send_block const & block_a)
|
||||
{
|
||||
balance_visitor prev (transaction, store);
|
||||
|
@ -1896,10 +1886,6 @@ result (0)
|
|||
{
|
||||
}
|
||||
|
||||
balance_visitor::~balance_visitor ()
|
||||
{
|
||||
}
|
||||
|
||||
void balance_visitor::send_block (rai::send_block const & block_a)
|
||||
{
|
||||
result += block_a.hashables.balance.number ();
|
||||
|
@ -1954,9 +1940,7 @@ public:
|
|||
ledger (ledger_a)
|
||||
{
|
||||
}
|
||||
virtual ~rollback_visitor ()
|
||||
{
|
||||
}
|
||||
virtual ~rollback_visitor () = default;
|
||||
void send_block (rai::send_block const & block_a) override
|
||||
{
|
||||
auto hash (block_a.hash ());
|
||||
|
@ -2544,10 +2528,6 @@ transaction (transaction_a)
|
|||
{
|
||||
}
|
||||
|
||||
ledger_processor::~ledger_processor ()
|
||||
{
|
||||
}
|
||||
|
||||
rai::vote::vote (rai::vote const & other_a) :
|
||||
sequence (other_a.sequence),
|
||||
block (other_a.block),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue