浏览代码

Update coded_stream.h

fix warning treated as error prevents building on 64-bit windows.
topillar 9 年之前
父节点
当前提交
64dfb5f80a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/google/protobuf/io/coded_stream.h

+ 1 - 1
src/google/protobuf/io/coded_stream.h

@@ -1136,7 +1136,7 @@ inline void CodedOutputStream::WriteVarint32(uint32 value) {
     // this write won't cross the end, so we can skip the checks.
     uint8* target = buffer_;
     uint8* end = WriteVarint32ToArray(value, target);
-    int size = end - target;
+    int size = static_cast<int>(end - target);
     Advance(size);
   } else {
     WriteVarint32SlowPath(value);