From 3431016e91ef966edc2ddde084657c1970ae240c Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Mon, 9 Sep 2024 07:02:14 -0700 Subject: [PATCH] Remove a few unused substitutions from string_view_field generator PiperOrigin-RevId: 672531308 --- .../cpp/field_generators/string_view_field.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc b/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc index 204cabc6a9..613f7aca9c 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc @@ -218,17 +218,9 @@ void SingularStringView::GenerateStaticMembers(io::Printer* p) const { void SingularStringView::GenerateAccessorDeclarations(io::Printer* p) const { ABSL_CHECK(!field_->options().has_ctype()); - auto vars = AnnotatedAccessors(field_, {"", "set_allocated_"}); - vars.push_back(Sub{ - "release_name", - SafeFunctionName(field_->containing_type(), field_, "release_"), - } - .AnnotatedAs(field_)); - auto v1 = p->WithVars(vars); + auto v1 = p->WithVars(AnnotatedAccessors(field_, {""})); auto v2 = p->WithVars( AnnotatedAccessors(field_, {"set_"}, AnnotationCollector::kSet)); - auto v3 = p->WithVars( - AnnotatedAccessors(field_, {"mutable_"}, AnnotationCollector::kAlias)); p->Emit( {{"donated", @@ -305,8 +297,6 @@ void SingularStringView::GenerateInlineAccessorDefinitions( } )cc"); }}, - {"release_name", - SafeFunctionName(field_->containing_type(), field_, "release_")}, }, R"cc( inline absl::string_view $Msg$::$name$() const