hpb: Have ExtensionNumber take in const ref ExtensionIdentifier

PiperOrigin-RevId: 694155074
pull/19141/head
Hong Shin 4 months ago committed by Copybara-Service
parent d4e848611a
commit 18ad79cdfd
  1. 17
      csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs
  2. 4
      hpb/extension.h

@ -1,17 +0,0 @@
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#endregion
namespace Google.Protobuf.Reflection;
internal sealed partial class FeatureSetDescriptor
{
// Canonical serialized form of the edition defaults, generated by embed_edition_defaults.
private const string DefaultsBase64 =
"ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH";
}

@ -300,8 +300,8 @@ decltype(auto) GetExtension(
template <typename T, typename Extension>
constexpr uint32_t ExtensionNumber(
::hpb::internal::ExtensionIdentifier<T, Extension> id) {
return ::hpb::internal::PrivateAccess::GetExtensionNumber(id);
const internal::ExtensionIdentifier<T, Extension>& id) {
return internal::PrivateAccess::GetExtensionNumber(id);
}
} // namespace hpb

Loading…
Cancel
Save