@@ -212,7 +212,7 @@ void ExpectationBase::CheckActionCountIfNotDone() const
212212 GTEST_LOCK_EXCLUDED_(mutex_) {
213213 bool should_check = false ;
214214 {
215- MutexLock l (& mutex_);
215+ MutexLock l (mutex_);
216216 if (!action_count_checked_) {
217217 action_count_checked_ = true ;
218218 should_check = true ;
@@ -318,7 +318,7 @@ UntypedFunctionMockerBase::~UntypedFunctionMockerBase() = default;
318318void UntypedFunctionMockerBase::RegisterOwner (const void * mock_obj)
319319 GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
320320 {
321- MutexLock l (& g_gmock_mutex);
321+ MutexLock l (g_gmock_mutex);
322322 mock_obj_ = mock_obj;
323323 }
324324 Mock::Register (mock_obj, this );
@@ -332,7 +332,7 @@ void UntypedFunctionMockerBase::SetOwnerAndName(const void* mock_obj,
332332 GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
333333 // We protect name_ under g_gmock_mutex in case this mock function
334334 // is called from two threads concurrently.
335- MutexLock l (& g_gmock_mutex);
335+ MutexLock l (g_gmock_mutex);
336336 mock_obj_ = mock_obj;
337337 name_ = name;
338338}
@@ -345,7 +345,7 @@ const void* UntypedFunctionMockerBase::MockObject() const
345345 {
346346 // We protect mock_obj_ under g_gmock_mutex in case this mock
347347 // function is called from two threads concurrently.
348- MutexLock l (& g_gmock_mutex);
348+ MutexLock l (g_gmock_mutex);
349349 Assert (mock_obj_ != nullptr , __FILE__, __LINE__,
350350 " MockObject() must not be called before RegisterOwner() or "
351351 " SetOwnerAndName() has been called." );
@@ -362,7 +362,7 @@ const char* UntypedFunctionMockerBase::Name() const
362362 {
363363 // We protect name_ under g_gmock_mutex in case this mock
364364 // function is called from two threads concurrently.
365- MutexLock l (& g_gmock_mutex);
365+ MutexLock l (g_gmock_mutex);
366366 Assert (name_ != nullptr , __FILE__, __LINE__,
367367 " Name() must not be called before SetOwnerAndName() has "
368368 " been called." );
@@ -490,7 +490,7 @@ class MockObjectRegistry {
490490 // failure, unless the user explicitly asked us to ignore it.
491491 ~MockObjectRegistry () {
492492 if (!GMOCK_FLAG_GET (catch_leaked_mocks)) return ;
493- internal::MutexLock l (& internal::g_gmock_mutex);
493+ internal::MutexLock l (internal::g_gmock_mutex);
494494
495495 int leaked_count = 0 ;
496496 for (StateMap::const_iterator it = states_.begin (); it != states_.end ();
@@ -559,7 +559,7 @@ UninterestingCallReactionMap() {
559559void SetReactionOnUninterestingCalls (uintptr_t mock_obj,
560560 internal::CallReaction reaction)
561561 GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
562- internal::MutexLock l (& internal::g_gmock_mutex);
562+ internal::MutexLock l (internal::g_gmock_mutex);
563563 UninterestingCallReactionMap ()[mock_obj] = reaction;
564564}
565565
@@ -590,15 +590,15 @@ void Mock::FailUninterestingCalls(uintptr_t mock_obj)
590590// entry in the call-reaction table should be removed.
591591void Mock::UnregisterCallReaction (uintptr_t mock_obj)
592592 GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
593- internal::MutexLock l (& internal::g_gmock_mutex);
593+ internal::MutexLock l (internal::g_gmock_mutex);
594594 UninterestingCallReactionMap ().erase (static_cast <uintptr_t >(mock_obj));
595595}
596596
597597// Returns the reaction Google Mock will have on uninteresting calls
598598// made on the given mock object.
599599internal::CallReaction Mock::GetReactionOnUninterestingCalls (
600600 const void * mock_obj) GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
601- internal::MutexLock l (& internal::g_gmock_mutex);
601+ internal::MutexLock l (internal::g_gmock_mutex);
602602 return (UninterestingCallReactionMap ().count (
603603 reinterpret_cast <uintptr_t >(mock_obj)) == 0 )
604604 ? internal::intToCallReaction (
@@ -611,7 +611,7 @@ internal::CallReaction Mock::GetReactionOnUninterestingCalls(
611611// objects.
612612void Mock::AllowLeak (const void * mock_obj)
613613 GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
614- internal::MutexLock l (& internal::g_gmock_mutex);
614+ internal::MutexLock l (internal::g_gmock_mutex);
615615 g_mock_object_registry.states ()[mock_obj].leakable = true ;
616616}
617617
@@ -620,7 +620,7 @@ void Mock::AllowLeak(const void* mock_obj)
620620// Test non-fatal failures and returns false.
621621bool Mock::VerifyAndClearExpectations (void * mock_obj)
622622 GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
623- internal::MutexLock l (& internal::g_gmock_mutex);
623+ internal::MutexLock l (internal::g_gmock_mutex);
624624 return VerifyAndClearExpectationsLocked (mock_obj);
625625}
626626
@@ -629,7 +629,7 @@ bool Mock::VerifyAndClearExpectations(void* mock_obj)
629629// verification was successful.
630630bool Mock::VerifyAndClear (void * mock_obj)
631631 GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
632- internal::MutexLock l (& internal::g_gmock_mutex);
632+ internal::MutexLock l (internal::g_gmock_mutex);
633633 ClearDefaultActionsLocked (mock_obj);
634634 return VerifyAndClearExpectationsLocked (mock_obj);
635635}
@@ -679,7 +679,7 @@ bool Mock::IsStrict(void* mock_obj)
679679void Mock::Register (const void * mock_obj,
680680 internal::UntypedFunctionMockerBase* mocker)
681681 GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
682- internal::MutexLock l (& internal::g_gmock_mutex);
682+ internal::MutexLock l (internal::g_gmock_mutex);
683683 g_mock_object_registry.states ()[mock_obj].function_mockers .insert (mocker);
684684}
685685
@@ -689,7 +689,7 @@ void Mock::Register(const void* mock_obj,
689689void Mock::RegisterUseByOnCallOrExpectCall (const void * mock_obj,
690690 const char * file, int line)
691691 GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
692- internal::MutexLock l (& internal::g_gmock_mutex);
692+ internal::MutexLock l (internal::g_gmock_mutex);
693693 MockObjectState& state = g_mock_object_registry.states ()[mock_obj];
694694 if (state.first_used_file == nullptr ) {
695695 state.first_used_file = file;
0 commit comments