瀏覽代碼

c++ remove conversion warning in MapEntryFuncs::ByteSizeLong

Christian Maurer 6 年之前
父節點
當前提交
6f0f382d56
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/google/protobuf/map_entry_lite.h

+ 1 - 1
src/google/protobuf/map_entry_lite.h

@@ -128,7 +128,7 @@ struct MapEntryFuncs {
     // Tags for key and value will both be one byte (field numbers 1 and 2).
     // Tags for key and value will both be one byte (field numbers 1 and 2).
     size_t inner_length =
     size_t inner_length =
         2 + KeyTypeHandler::ByteSize(key) + ValueTypeHandler::ByteSize(value);
         2 + KeyTypeHandler::ByteSize(key) + ValueTypeHandler::ByteSize(value);
-    return inner_length + io::CodedOutputStream::VarintSize32(inner_length);
+    return inner_length + io::CodedOutputStream::VarintSize32(static_cast<uint32>(inner_length));
   }
   }
 
 
   static int GetCachedSize(const Key& key, const Value& value) {
   static int GetCachedSize(const Key& key, const Value& value) {