Automated Code Change

PiperOrigin-RevId: 612547901
pull/15995/head
Chris Kennelly 11 months ago committed by Copybara-Service
parent d4bfe52d99
commit 9e7cff0629
  1. 6
      benchmarks/benchmark.cc

@ -214,7 +214,7 @@ static void BM_LoadAdsDescriptor_Proto2(benchmark::State& state) {
for (auto file : serialized_files) {
absl::string_view input(file.data, file.size);
auto proto =
protobuf::Arena::CreateMessage<protobuf::FileDescriptorProto>(&arena);
protobuf::Arena::Create<protobuf::FileDescriptorProto>(&arena);
bool ok = proto->ParseFrom<protobuf::MessageLite::kMergePartial>(input) &&
pool.BuildFile(*proto) != nullptr;
if (!ok) {
@ -292,7 +292,7 @@ struct Proto2Factory<NoArena, P> {
template <class P>
struct Proto2Factory<UseArena, P> {
public:
P* GetProto() { return protobuf::Arena::CreateMessage<P>(&arena); }
P* GetProto() { return protobuf::Arena::Create<P>(&arena); }
private:
protobuf::Arena arena;
@ -302,7 +302,7 @@ template <class P>
struct Proto2Factory<InitBlock, P> {
public:
Proto2Factory() : arena(GetOptions()) {}
P* GetProto() { return protobuf::Arena::CreateMessage<P>(&arena); }
P* GetProto() { return protobuf::Arena::Create<P>(&arena); }
private:
protobuf::ArenaOptions GetOptions() {

Loading…
Cancel
Save