Эх сурвалжийг харах

Return uint32 from Log2FloorNonZero64

A uint32 is big enough to hold any return value from that function, and
doing it this way prevents compiler warnings in coded_stream.h about
narrowing a uint64 to a uint32.
Adam Cozzette 8 жил өмнө
parent
commit
938206d66c

+ 1 - 1
src/google/protobuf/stubs/port.h

@@ -358,7 +358,7 @@ class Bits {
 #endif
 #endif
   }
   }
 
 
-  static uint64 Log2FloorNonZero64(uint64 n) {
+  static uint32 Log2FloorNonZero64(uint64 n) {
 #if defined(__GNUC__)
 #if defined(__GNUC__)
   return 63 ^ __builtin_clzll(n);
   return 63 ^ __builtin_clzll(n);
 #else
 #else