diff options
author | Wink Saville <wink@google.com> | 2014-03-21 17:08:30 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-03-21 17:08:31 +0000 |
commit | ddc98d6dd0800d180454b40ac9cc80f61cc53c21 (patch) | |
tree | 86ca269ba05f0c7b2faf133caa8a0a267b937c76 /src | |
parent | 3a2109246f0223ad6f14bc986b46453eb51aaadb (diff) | |
parent | 5090f19ea7f56a5ceb27a8872a659479282e6871 (diff) | |
download | protobuf-ddc98d6dd0800d180454b40ac9cc80f61cc53c21.tar.gz protobuf-ddc98d6dd0800d180454b40ac9cc80f61cc53c21.tar.bz2 protobuf-ddc98d6dd0800d180454b40ac9cc80f61cc53c21.zip |
Merge "Don't reset cachedSize to 0 in getSerializedSize"
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/javanano/javanano_message.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_message.cc b/src/google/protobuf/compiler/javanano/javanano_message.cc index 008bec26..3a1b5a50 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" - "public int getSerializedSize() {\n" - " int size = super.getSerializedSize();\n"); + "protected int computeSerializedSize() {\n" + " int size = super.computeSerializedSize();\n"); printer->Indent(); for (int i = 0; i < descriptor_->field_count(); i++) { @@ -314,7 +314,6 @@ GenerateMessageSerializationMethods(io::Printer* printer) { printer->Outdent(); printer->Print( - " cachedSize = size;\n" " return size;\n" "}\n"); } |