aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-17 18:51:06 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-11-17 18:51:06 +0100
commit4beb33aee4a74a298a548d27806e95946910c2e5 (patch)
tree1597b5e5fb68842a91fd05661e8d3ff3b9f20768 /staging_vespalib
parent4b1fcd494ab08a368c01c566b48707fe9ca42f2f (diff)
mark all temporary variables that only exist to assert (void), so that NDEBUG builds can succeed too.
Diffstat (limited to 'staging_vespalib')
-rw-r--r--staging_vespalib/src/vespa/vespalib/stllike/cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/stllike/cache.h b/staging_vespalib/src/vespa/vespalib/stllike/cache.h
index 02795510870..2304d6389b2 100644
--- a/staging_vespalib/src/vespa/vespalib/stllike/cache.h
+++ b/staging_vespalib/src/vespa/vespalib/stllike/cache.h
@@ -263,6 +263,7 @@ void
cache<P>::invalidate(const vespalib::LockGuard & guard, const K & key)
{
assert(guard.locks(_hashLock));
+ (void) guard;
if (Lru::hasKey(key)) {
_sizeBytes -= calcSize(key, (*this)[key]);
_invalidate++;
@@ -274,6 +275,7 @@ template< typename P >
bool
cache<P>::hasKey(const vespalib::LockGuard & guard, const K & key) const
{
+ (void) guard;
assert(guard.locks(_hashLock));
_lookup++;
return Lru::hasKey(key);