diff --git a/pybind11_protobuf/check_unknown_fields.cc b/pybind11_protobuf/check_unknown_fields.cc index dca0e25..794234d 100644 --- a/pybind11_protobuf/check_unknown_fields.cc +++ b/pybind11_protobuf/check_unknown_fields.cc @@ -62,7 +62,7 @@ bool MessageMayContainExtensionsRecursive(const ::google::protobuf::Descriptor* bool MessageMayContainExtensionsMemoized(const ::google::protobuf::Descriptor* descriptor) { static auto* memoized = new MayContainExtensionsMap(); static absl::Mutex lock; - absl::MutexLock l(&lock); + absl::MutexLock l(lock); return MessageMayContainExtensionsRecursive(descriptor, memoized); } @@ -187,11 +187,11 @@ absl::optional CheckRecursively( const auto* root_descriptor = message->GetDescriptor(); HasUnknownFields search{py_proto_api, root_descriptor}; if (!search.FindUnknownFieldsRecursive(message, 0u)) { - return absl::nullopt; + return std::nullopt; } if (GetAllowList()->count(MakeAllowListKey(root_descriptor->full_name(), search.FieldFQN())) != 0) { - return absl::nullopt; + return std::nullopt; } return search.BuildErrorMessage(); }