From b7bbe54321d3c2176f8f4eba3c18a363dff753d3 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Wed, 26 Aug 2015 13:45:30 -0700 Subject: [PATCH] Remove an unused typedef. --- src/google/protobuf/compiler/cpp/cpp_message.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index aa10b0bb0..fc1ce962a 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -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++) {