Skip to content

Commit

Permalink
Merge pull request protocolbuffers#748 from xfxyjwf/unused_typedef
Browse files Browse the repository at this point in the history
Remove an unused typedef.
  • Loading branch information
xfxyjwf committed Aug 26, 2015
2 parents 042bfaf + b7bbe54 commit d7d9acc
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/google/protobuf/compiler/cpp/cpp_message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2536,13 +2536,7 @@ GenerateOneofClear(io::Printer* printer) {
printer->Print(oneof_vars,
"void $classname$::clear_$oneofname$() {\n");
printer->Indent();
// In .proto.h mode, fields with a dependent type will generate
// clearing code that down casts from the dependent base class.
// However, clear_oneof() methods are always in the .cc file, and thus
// must remain in the derived base. So, to make the clearing code work,
// we add a typedef so that the down cast works (it will be a no-op).
printer->Print(oneof_vars,
"typedef $classname$ T;\n"
"switch($oneofname$_case()) {\n");
printer->Indent();
for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) {
Expand Down

0 comments on commit d7d9acc

Please sign in to comment.