소스 검색

Merge pull request #2332 from Kwizatz/master

Added explicit cast to avoid size warning on Win64.
Adam Cozzette 9 년 전
부모
커밋
ce5160b83b
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
   // proto.
-  virtual int ByteSize() const { return ByteSizeLong(); }
+  virtual int ByteSize() const { return static_cast<int>(ByteSizeLong()); }
   virtual size_t ByteSizeLong() const;
 
   // Serializes the message without recomputing the size.  The message must