aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/extension_set_heavy.cc
diff options
context:
space:
mode:
authorGravatar Bo Yang <teboring@google.com>2016-09-19 13:45:07 -0700
committerGravatar Bo Yang <teboring@google.com>2016-10-10 11:23:36 -0700
commitcc8ca5b6a5478b40546d4206392eb1471454460d (patch)
treec0b45abfa16d7d373a6ea8f7fe50f1de00ab938e /src/google/protobuf/extension_set_heavy.cc
parent337a028bb65ccca4dda768695950b5aba53ae2c9 (diff)
Integrate internal changes
Diffstat (limited to 'src/google/protobuf/extension_set_heavy.cc')
-rw-r--r--src/google/protobuf/extension_set_heavy.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/google/protobuf/extension_set_heavy.cc b/src/google/protobuf/extension_set_heavy.cc
index b26a246c..1bbc8fef 100644
--- a/src/google/protobuf/extension_set_heavy.cc
+++ b/src/google/protobuf/extension_set_heavy.cc
@@ -749,7 +749,7 @@ void ExtensionSet::Extension::SerializeMessageSetItemWithCachedSizes(
output->WriteTag(WireFormatLite::kMessageSetItemEndTag);
}
-int ExtensionSet::Extension::MessageSetItemByteSize(int number) const {
+size_t ExtensionSet::Extension::MessageSetItemByteSize(int number) const {
if (type != WireFormatLite::TYPE_MESSAGE || is_repeated) {
// Not a valid MessageSet extension, but compute the byte size for it the
// normal way.
@@ -758,13 +758,13 @@ int ExtensionSet::Extension::MessageSetItemByteSize(int number) const {
if (is_cleared) return 0;
- int our_size = WireFormatLite::kMessageSetItemTagsSize;
+ size_t our_size = WireFormatLite::kMessageSetItemTagsSize;
// type_id
our_size += io::CodedOutputStream::VarintSize32(number);
// message
- int message_size = 0;
+ size_t message_size = 0;
if (is_lazy) {
message_size = lazymessage_value->ByteSize();
} else {
@@ -785,8 +785,8 @@ void ExtensionSet::SerializeMessageSetWithCachedSizes(
}
}
-int ExtensionSet::MessageSetByteSize() const {
- int total_size = 0;
+size_t ExtensionSet::MessageSetByteSize() const {
+ size_t total_size = 0;
for (ExtensionMap::const_iterator iter = extensions_.begin();
iter != extensions_.end(); ++iter) {