From 4bedd68d2c058184333101e4d3a31856f6226cd4 Mon Sep 17 00:00:00 2001 From: warptangent Date: Sun, 22 Mar 2015 10:57:18 -0700 Subject: Update Blockchain::get_db() to return reference instead of pointer Where this method is used, a BlockchainDB object is always expected, so a pointer is unnecessary and less safe. --- src/cryptonote_core/blockchain.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cryptonote_core/blockchain.h') diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index da4da075b..dc98a56a4 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -145,9 +145,9 @@ namespace cryptonote void set_enforce_dns_checkpoints(bool enforce); bool update_checkpoints(const std::string& file_path, bool check_dns); - BlockchainDB* get_db() + BlockchainDB& get_db() { - return m_db; + return *m_db; } private: -- cgit v1.2.3