aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/wire_format_lite_inl.h
diff options
context:
space:
mode:
authorGravatar Kal Conley <kcconley@gmail.com>2015-11-28 11:49:51 -0800
committerGravatar Kal Conley <kcconley@gmail.com>2015-11-28 20:22:25 -0800
commita52539a32dd5e84203c8392c635a2602d8672420 (patch)
treedb4c907a9d82bb59bc0f6e96c59d5a668268cdf1 /src/google/protobuf/wire_format_lite_inl.h
parentd3cb5f4078428806b0a90d7e0b4345e3adf7c253 (diff)
Fix some narrowing implicit casts [NFC]
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());
}