aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-12-22 11:41:54 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-12-28 19:13:46 +0100
commit7192d872ef68b7a0588e7f5710ff49350c6863fb (patch)
tree8abb15116e46ad7b1f865f77881ec0b73dc29bb9
parent5e7bce870190540010018932137d643538c8de44 (diff)
Make constructor explicit.
-rw-r--r--searchlib/src/vespa/searchlib/docstore/visitcache.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/docstore/visitcache.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/docstore/visitcache.cpp b/searchlib/src/vespa/searchlib/docstore/visitcache.cpp
index 8f73c9862ae..7e881d8de76 100644
--- a/searchlib/src/vespa/searchlib/docstore/visitcache.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/visitcache.cpp
@@ -209,8 +209,7 @@ VisitCache::Cache::locateAndInvalidateOtherSubsets(const LockGuard & cacheGuard,
CompressedBlobSet
VisitCache::read(const IDocumentStore::LidVector & lids) const {
- KeySet key(lids);
- return _cache->readSet(lids);
+ return _cache->readSet(KeySet(lids));
}
void
diff --git a/searchlib/src/vespa/searchlib/docstore/visitcache.h b/searchlib/src/vespa/searchlib/docstore/visitcache.h
index 1bf867c5580..effc6c19a21 100644
--- a/searchlib/src/vespa/searchlib/docstore/visitcache.h
+++ b/searchlib/src/vespa/searchlib/docstore/visitcache.h
@@ -20,7 +20,7 @@ class KeySet {
public:
KeySet() : _keys() { }
KeySet(uint32_t key);
- KeySet(const IDocumentStore::LidVector &keys);
+ explicit KeySet(const IDocumentStore::LidVector &keys);
uint32_t hash() const { return _keys.empty() ? 0 : _keys[0]; }
bool operator==(const KeySet &rhs) const { return _keys == rhs._keys; }
bool operator<(const KeySet &rhs) const { return _keys < rhs._keys; }