Skip to content

Commit 40780b2

Browse files
authored
Fix warnings when using absl::Mutex (#272)
1 parent 154c634 commit 40780b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

parallel_hashmap/phmap_base.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5007,10 +5007,10 @@ class LockableImpl<phmap::NullMutex>: public phmap::NullMutex
50075007
{
50085008
void lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() { this->Lock(); }
50095009
void unlock() ABSL_UNLOCK_FUNCTION() { this->Unlock(); }
5010-
void try_lock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) { this->TryLock(); }
5010+
bool try_lock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) { return this->TryLock(); }
50115011
void lock_shared() ABSL_SHARED_LOCK_FUNCTION() { this->ReaderLock(); }
50125012
void unlock_shared() ABSL_UNLOCK_FUNCTION() { this->ReaderUnlock(); }
5013-
void try_lock_shared() ABSL_SHARED_TRYLOCK_FUNCTION(true) { this->ReaderTryLock(); }
5013+
bool try_lock_shared() ABSL_SHARED_TRYLOCK_FUNCTION(true) { return this->ReaderTryLock(); }
50145014
};
50155015

50165016
template <>

0 commit comments

Comments
 (0)