Skip to content

Commit

Permalink
hpb: delete dead code in gen_enums
Browse files Browse the repository at this point in the history
`WriteHeaderEnumForwardDecls` was never used.

PiperOrigin-RevId: 683639510
  • Loading branch information
honglooker authored and copybara-github committed Oct 8, 2024
1 parent be9eb4b commit 6690ab4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions hpb_generator/gen_enums.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,5 @@ void WriteEnumDeclarations(
}
}

void WriteHeaderEnumForwardDecls(
std::vector<const protobuf::EnumDescriptor*>& enums, Output& output) {
for (const auto* enumdesc : enums) {
output("enum $0 : int;\n", EnumTypeName(enumdesc));
}
}

} // namespace protobuf
} // namespace google::hpb_generator
2 changes: 0 additions & 2 deletions hpb_generator/gen_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ std::string EnumTypeName(const protobuf::EnumDescriptor* enum_descriptor);
std::string EnumValueSymbolInNameSpace(
const protobuf::EnumDescriptor* desc,
const protobuf::EnumValueDescriptor* value);
void WriteHeaderEnumForwardDecls(
std::vector<const protobuf::EnumDescriptor*>& enums, Output& output);
void WriteEnumDeclarations(
const std::vector<const protobuf::EnumDescriptor*>& enums, Output& output);

Expand Down

0 comments on commit 6690ab4

Please sign in to comment.