diff options
author | Wink Saville <wink@google.com> | 2014-03-21 18:05:10 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2014-03-21 18:05:10 -0700 |
commit | 2d849337400b64ee913ece4631d3b2dbc95f20d8 (patch) | |
tree | 629735fb54faae65062c4738769930b2685f8f09 /src/google | |
parent | ec0b12c34a6329d2f98003e9102fe2d75726c797 (diff) | |
download | external_protobuf-2d849337400b64ee913ece4631d3b2dbc95f20d8.zip external_protobuf-2d849337400b64ee913ece4631d3b2dbc95f20d8.tar.gz external_protobuf-2d849337400b64ee913ece4631d3b2dbc95f20d8.tar.bz2 |
Revert "Don't reset cachedSize to 0 in getSerializedSize"
This reverts commit c6e12c6702ca764486f952654ba1568f00efe813.
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/compiler/javanano/javanano_message.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_message.cc b/src/google/protobuf/compiler/javanano/javanano_message.cc index 3a1b5a5..008bec2 100644 --- a/src/google/protobuf/compiler/javanano/javanano_message.cc +++ b/src/google/protobuf/compiler/javanano/javanano_message.cc @@ -304,8 +304,8 @@ GenerateMessageSerializationMethods(io::Printer* printer) { printer->Print( "\n" "@Override\n" - "protected int computeSerializedSize() {\n" - " int size = super.computeSerializedSize();\n"); + "public int getSerializedSize() {\n" + " int size = super.getSerializedSize();\n"); printer->Indent(); for (int i = 0; i < descriptor_->field_count(); i++) { @@ -314,6 +314,7 @@ GenerateMessageSerializationMethods(io::Printer* printer) { printer->Outdent(); printer->Print( + " cachedSize = size;\n" " return size;\n" "}\n"); } |