Explorar el Código

Merge pull request #467 from AustinSchuh/GOOGLE_PREDICT_FALSE

Fixed bug in GOOGLE_PREDICT_FALSE.
Feng Xiao hace 10 años
padre
commit
f51f1b7bb6
Se han modificado 1 ficheros con 1 adiciones y 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