summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2017-11-14 11:44:36 +0000
committerGeir Storli <geirst@oath.com>2017-11-14 11:44:36 +0000
commit279e35a1850f83771012c9c30230fd9c0e4e7896 (patch)
treed41afb4f7a1a667ae91a0933d503965680347f05 /storage
parent9d4aa51784956ffcb33d263b511e99eda374e356 (diff)
Simplify as std::unique_ptr has operator bool.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
index f9bb301dcaa..eaebba9ccc5 100644
--- a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
+++ b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
@@ -165,7 +165,7 @@ StorageBucketDBInitializer::onOpen()
// Trigger bucket database initialization
for (uint32_t i=0; i<_system._partitions.size(); ++i) {
if (!_system._partitions[i].isUp()) continue;
- assert(_readState[i].get() != nullptr);
+ assert(_readState[i]);
const BucketSpaceReadState &spaceState = *_readState[i];
for (const auto &stateElem : spaceState) {
document::BucketSpace bucketSpace = stateElem.first;
@@ -242,7 +242,7 @@ notDoneCount(const StorageBucketDBInitializer::ReadState &readState)
{
size_t result = 0;
for (const auto &elem : readState) {
- if (elem.get() != nullptr) {
+ if (elem) {
for (const auto &stateElem : *elem) {
if (!stateElem.second->_done) {
++result;