diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2017-07-18 16:26:16 -0700 |
---|---|---|
committer | Jisi Liu <jisi.liu@gmail.com> | 2017-07-18 16:26:16 -0700 |
commit | 3af881c7e2db0553207876acbdb91c6e77974e44 (patch) | |
tree | 35e2a96cce802d4235bd29afa396e28ead892fa2 /src/google/protobuf/map_type_handler.h | |
parent | 86975301f1876ce1934612777b8ca6c76520f5cc (diff) | |
parent | 942a29cecd36f2a4b22fdd2179635cd548e6bd27 (diff) |
Merge master into 3.4.x
Diffstat (limited to 'src/google/protobuf/map_type_handler.h')
-rw-r--r-- | src/google/protobuf/map_type_handler.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/google/protobuf/map_type_handler.h b/src/google/protobuf/map_type_handler.h index a10a7205..423c98f1 100644 --- a/src/google/protobuf/map_type_handler.h +++ b/src/google/protobuf/map_type_handler.h @@ -283,7 +283,7 @@ MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::ByteSize( template <typename Type> \ inline int MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::ByteSize( \ const MapEntryAccessorType& value) { \ - return WireFormatLite::DeclaredType##Size(value); \ + return static_cast<int>(WireFormatLite::DeclaredType##Size(value)); \ } GOOGLE_PROTOBUF_BYTE_SIZE(STRING, String) @@ -319,7 +319,9 @@ template <typename Type> inline int MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::GetCachedSize( const MapEntryAccessorType& value) { - return WireFormatLite::LengthDelimitedSize(value.GetCachedSize()); + return static_cast<int>( + WireFormatLite::LengthDelimitedSize( + static_cast<size_t>(value.GetCachedSize()))); } #define GET_CACHED_SIZE(FieldType, DeclaredType) \ @@ -327,7 +329,7 @@ MapTypeHandler<WireFormatLite::TYPE_MESSAGE, Type>::GetCachedSize( inline int \ MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::GetCachedSize( \ const MapEntryAccessorType& value) { \ - return WireFormatLite::DeclaredType##Size(value); \ + return static_cast<int>(WireFormatLite::DeclaredType##Size(value)); \ } GET_CACHED_SIZE(STRING, String) |