Explorar o código

Merge pull request #1344 from topillar/patch-1

Update coded_stream.h
Feng Xiao %!s(int64=9) %!d(string=hai) anos
pai
achega
34eeeff640
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);