@@ -63,7 +63,7 @@ ResourceImplBase::~ResourceImplBase() = default;
6363ResourceSpecImplBase::~ResourceSpecImplBase () = default ;
6464
6565ContextImplPtr GetCreator (ResourceImplBase& resource) {
66- absl::MutexLock lock (& resource.mutex_ );
66+ absl::MutexLock lock (resource.mutex_ );
6767 auto * creator_ptr = resource.weak_creator_ ;
6868 if (!creator_ptr ||
6969 !internal::IncrementReferenceCountIfNonZero (*creator_ptr)) {
@@ -125,7 +125,7 @@ ContextImpl::~ContextImpl() {
125125 auto & result = resource_container->result_ ;
126126 if (!result.ok ()) continue ;
127127 auto & resource = **result;
128- absl::MutexLock lock (& resource.mutex_ );
128+ absl::MutexLock lock (resource.mutex_ );
129129 // Only reset the `weak_creator_` if it points to `this`. `resources_` can
130130 // contain resources that are actually references to resources in a parent
131131 // context, in which case we must not change `weak_creator_`.
@@ -342,7 +342,7 @@ class ResourceReference : public ResourceSpecImplBase {
342342 // Look up referent.
343343 std::string_view referent = referent_;
344344 auto * mutex = &creation_context.context_ ->root_ ->mutex_ ;
345- absl::MutexLock lock (mutex);
345+ absl::MutexLock lock (* mutex);
346346 ContextImpl* c = creation_context.context_ ;
347347 if (referent.empty ()) {
348348 // Refers to default value in parent. Only valid within a context spec.
@@ -404,7 +404,7 @@ class ResourceReference : public ResourceSpecImplBase {
404404void RegisterContextResourceProvider (
405405 std::unique_ptr<const ResourceProviderImplBase> provider) {
406406 auto & registry = GetRegistry ();
407- absl::MutexLock lock (& registry.mutex_ );
407+ absl::MutexLock lock (registry.mutex_ );
408408 auto id = provider->id_ ;
409409 if (!registry.providers_ .insert (std::move (provider)).second ) {
410410 ABSL_LOG (FATAL) << " Provider " << QuoteString (id) << " already registered" ;
@@ -413,7 +413,7 @@ void RegisterContextResourceProvider(
413413
414414const ResourceProviderImplBase* GetProvider (std::string_view id) {
415415 auto & registry = GetRegistry ();
416- absl::ReaderMutexLock lock (& registry.mutex_ );
416+ absl::ReaderMutexLock lock (registry.mutex_ );
417417 auto it = registry.providers_ .find (id);
418418 if (it == registry.providers_ .end ()) return nullptr ;
419419 return it->get ();
@@ -873,7 +873,7 @@ void AllContextResources::UnbindContext(
873873 // bound.
874874 {
875875 auto & registry = internal_context::GetRegistry ();
876- absl::ReaderMutexLock lock (& registry.mutex_ );
876+ absl::ReaderMutexLock lock (registry.mutex_ );
877877 for (const auto & provider : registry.providers_ ) {
878878 internal_context::ResourceSpecImplPtr resource_spec_impl (
879879 new internal_context::ResourceReference (std::string (provider->id_ )));
0 commit comments