Skip to content

Commit 296d023

Browse files
Tensorstore Teamcopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 816161775 Change-Id: I335f21798fd863e13447f081ad673901869363e6
1 parent 9f913f8 commit 296d023

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tensorstore/internal/json_registry_impl.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ absl::Status GetJsonUnregisteredError(std::string_view id) {
4444
}
4545

4646
void JsonRegistryImpl::Register(std::unique_ptr<Entry> entry, bool alias) {
47-
absl::WriterMutexLock lock(&mutex_);
47+
absl::WriterMutexLock lock(mutex_);
4848
if (!alias) {
4949
auto [it, inserted] = entries_by_type_.insert(entry.get());
5050
if (!inserted) {
@@ -67,7 +67,7 @@ absl::Status JsonRegistryImpl::LoadKey(
6767
auto id, internal_json_binding::FromJson<std::string>(std::move(*j)));
6868
const Entry* entry = nullptr;
6969
{
70-
absl::ReaderMutexLock lock(&mutex_);
70+
absl::ReaderMutexLock lock(mutex_);
7171
if (auto it = entries_.find(id); it != entries_.end()) {
7272
entry = it->get();
7373
}
@@ -84,7 +84,7 @@ absl::Status JsonRegistryImpl::SaveKey(std::type_index type,
8484
::nlohmann::json* j) const {
8585
const Entry* entry = nullptr;
8686
{
87-
absl::ReaderMutexLock lock(&mutex_);
87+
absl::ReaderMutexLock lock(mutex_);
8888
if (auto it = entries_by_type_.find(type); it != entries_by_type_.end()) {
8989
entry = *it;
9090
}
@@ -102,7 +102,7 @@ absl::Status JsonRegistryImpl::LoadRegisteredObject(
102102
::nlohmann::json::object_t* j_obj) const {
103103
const Entry* entry = nullptr;
104104
{
105-
absl::ReaderMutexLock lock(&mutex_);
105+
absl::ReaderMutexLock lock(mutex_);
106106
if (auto it = entries_by_type_.find(type); it != entries_by_type_.end()) {
107107
entry = *it;
108108
}
@@ -118,7 +118,7 @@ absl::Status JsonRegistryImpl::SaveRegisteredObject(
118118
::nlohmann::json::object_t* j_obj) const {
119119
const Entry* entry = nullptr;
120120
{
121-
absl::ReaderMutexLock lock(&mutex_);
121+
absl::ReaderMutexLock lock(mutex_);
122122
if (auto it = entries_by_type_.find(type); it != entries_by_type_.end()) {
123123
entry = *it;
124124
}

0 commit comments

Comments
 (0)