浏览代码

Added explicit cast to avoid size warning on Win64.

Rodrigo Hernandez 9 年之前
父节点
当前提交
975d577a2b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/google/protobuf/message_lite.h

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

@@ -244,7 +244,7 @@ class LIBPROTOBUF_EXPORT MessageLite {
   //
   //
   // ByteSize() is generally linear in the number of fields defined for the
   // ByteSize() is generally linear in the number of fields defined for the
   // proto.
   // proto.
-  virtual int ByteSize() const { return ByteSizeLong(); }
+  virtual int ByteSize() const { return static_cast<int>(ByteSizeLong()); }
   virtual size_t ByteSizeLong() const;
   virtual size_t ByteSizeLong() const;
 
 
   // Serializes the message without recomputing the size.  The message must
   // Serializes the message without recomputing the size.  The message must