aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb
diff options
context:
space:
mode:
authorwarptangent <warptangent@tutanota.com>2016-02-13 03:35:48 -0800
committerwarptangent <warptangent@tutanota.com>2016-02-13 04:17:36 -0800
commitf5581c35364ca71386d4ad4dc0c91cf0617339be (patch)
tree3db22cf79f955bcaf14bf0ab8fb0e507d070408c /src/blockchain_db/lmdb
parentMerge pull request #650 (diff)
downloadmonero-f5581c35364ca71386d4ad4dc0c91cf0617339be.tar.xz
BlockchainLMDB: Replace remaining txn pointer NULLs with nullptr
For consistency.
Diffstat (limited to 'src/blockchain_db/lmdb')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 28e6f5525..2d116c532 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -235,7 +235,7 @@ mdb_txn_safe::mdb_txn_safe() : m_txn(NULL)
mdb_txn_safe::~mdb_txn_safe()
{
LOG_PRINT_L3("mdb_txn_safe: destructor");
- if (m_txn != NULL)
+ if (m_txn != nullptr)
{
if (m_batch_txn) // this is a batch txn and should have been handled before this point for safety
{
@@ -265,19 +265,19 @@ void mdb_txn_safe::commit(std::string message)
if (auto result = mdb_txn_commit(m_txn))
{
- m_txn = NULL;
+ m_txn = nullptr;
throw0(DB_ERROR((message + ": ").append(mdb_strerror(result)).c_str()));
}
- m_txn = NULL;
+ m_txn = nullptr;
}
void mdb_txn_safe::abort()
{
LOG_PRINT_L3("mdb_txn_safe: abort()");
- if(m_txn != NULL)
+ if(m_txn != nullptr)
{
mdb_txn_abort(m_txn);
- m_txn = NULL;
+ m_txn = nullptr;
}
else
{
@@ -2216,7 +2216,7 @@ void BlockchainLMDB::block_txn_stop()
time_commit1 += time1;
delete m_write_txn;
- m_write_txn = NULL;
+ m_write_txn = nullptr;
}
}
@@ -2226,7 +2226,7 @@ void BlockchainLMDB::block_txn_abort()
if (! m_batch_active)
{
delete m_write_txn;
- m_write_txn = NULL;
+ m_write_txn = nullptr;
}
}
@@ -2280,7 +2280,7 @@ void BlockchainLMDB::pop_block(block& blk, std::vector<transaction>& txs)
BlockchainDB::pop_block(blk, txs);
if (! m_batch_active)
{
- m_write_txn = NULL;
+ m_write_txn = nullptr;
txn.commit();
}
@@ -2288,7 +2288,7 @@ void BlockchainLMDB::pop_block(block& blk, std::vector<transaction>& txs)
catch (...)
{
m_num_outputs = num_outputs;
- m_write_txn = NULL;
+ m_write_txn = nullptr;
throw;
}