Remove a few unused substitutions from string_view_field generator

PiperOrigin-RevId: 672531308
pull/18144/head
Protobuf Team Bot 3 months ago committed by Copybara-Service
parent c8e016c546
commit 3431016e91
  1. 12
      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

Loading…
Cancel
Save