Explorar o código

Merge pull request #467 from AustinSchuh/GOOGLE_PREDICT_FALSE

Fixed bug in GOOGLE_PREDICT_FALSE.
Feng Xiao %!s(int64=10) %!d(string=hai) anos
pai
achega
f51f1b7bb6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/google/protobuf/stubs/common.h

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

@@ -258,7 +258,7 @@ static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
 #ifndef GOOGLE_PREDICT_FALSE
 #ifdef __GNUC__
 // Provided at least since GCC 3.0.
-#define GOOGLE_PREDICT_FALSE(x) (__builtin_expect(!!(x), 1))
+#define GOOGLE_PREDICT_FALSE(x) (__builtin_expect(x, 0))
 #else
 #define GOOGLE_PREDICT_FALSE
 #endif