aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/wire_format_lite_inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/wire_format_lite_inl.h')
-rw-r--r--src/google/protobuf/wire_format_lite_inl.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/google/protobuf/wire_format_lite_inl.h b/src/google/protobuf/wire_format_lite_inl.h
index 991c3d04..b1c477d1 100644
--- a/src/google/protobuf/wire_format_lite_inl.h
+++ b/src/google/protobuf/wire_format_lite_inl.h
@@ -835,12 +835,14 @@ inline int WireFormatLite::EnumSize(int value) {
}
inline int WireFormatLite::StringSize(const string& value) {
- return io::CodedOutputStream::VarintSize32(value.size()) +
- value.size();
+ return static_cast<int>(
+ io::CodedOutputStream::VarintSize32(static_cast<uint32>(value.size())) +
+ value.size());
}
inline int WireFormatLite::BytesSize(const string& value) {
- return io::CodedOutputStream::VarintSize32(value.size()) +
- value.size();
+ return static_cast<int>(
+ io::CodedOutputStream::VarintSize32(static_cast<uint32>(value.size())) +
+ value.size());
}