ソースを参照

Merge pull request #1155 from jcburke14/jb-intcast

Fix compiler warning from repeated_field.h
Feng Xiao 9 年 前
コミット
6794d17c94
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/google/protobuf/repeated_field.h

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

@@ -692,7 +692,7 @@ class LIBPROTOBUF_EXPORT StringTypeHandlerBase {
 class StringTypeHandler : public StringTypeHandlerBase {
 class StringTypeHandler : public StringTypeHandlerBase {
  public:
  public:
   static int SpaceUsed(const string& value)  {
   static int SpaceUsed(const string& value)  {
-    return sizeof(value) + StringSpaceUsedExcludingSelf(value);
+    return static_cast<int>(sizeof(value)) + StringSpaceUsedExcludingSelf(value);
   }
   }
 };
 };