aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xiaofeng@google.com>2015-08-26 13:55:51 -0700
committerFeng Xiao <xiaofeng@google.com>2015-08-26 13:55:51 -0700
commitd7d9accc1d2acfa35e5765150f1ac9dcdf34637a (patch)
tree1fada3fafb8d14fed7788fae45db24125086aaf1
parent042bfaf67f07ab7f277d35a5e654d101d980e202 (diff)
parentb7bbe54321d3c2176f8f4eba3c18a363dff753d3 (diff)
downloadprotobuf-d7d9accc1d2acfa35e5765150f1ac9dcdf34637a.tar.gz
protobuf-d7d9accc1d2acfa35e5765150f1ac9dcdf34637a.tar.bz2
protobuf-d7d9accc1d2acfa35e5765150f1ac9dcdf34637a.zip
Merge pull request #748 from xfxyjwf/unused_typedef
Remove an unused typedef.
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_message.cc6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc
index aa10b0bb..fc1ce962 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++) {