diff options
author | <shinichiro.hamaji@gmail.com> | 2009-11-11 09:07:47 +0000 |
---|---|---|
committer | <shinichiro.hamaji@gmail.com> | 2009-11-11 09:07:47 +0000 |
commit | b71aa943814bad7668e5e058bc7c5599d7169258 (patch) | |
tree | 8c7f7744b061884fc0a9f8a07b8279700abdc603 | |
parent | effef71e00d76f0a7662b0606ade27a60102bc40 (diff) | |
download | glog-b71aa943814bad7668e5e058bc7c5599d7169258.tar.gz glog-b71aa943814bad7668e5e058bc7c5599d7169258.tar.bz2 glog-b71aa943814bad7668e5e058bc7c5599d7169258.zip |
Fix compilation error with -DNDEBUG.
This bug is reported in
http://code.google.com/p/google-glog/issues/detail?id=19
git-svn-id: https://google-glog.googlecode.com/svn/trunk@74 eb4d4688-79bd-11dd-afb4-1d65580434c0
-rw-r--r-- | src/glog/logging.h.in | 13 | ||||
-rwxr-xr-x | src/windows/glog/logging.h | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in index 8e8af78..4397621 100644 --- a/src/glog/logging.h.in +++ b/src/glog/logging.h.in @@ -652,7 +652,7 @@ DEFINE_CHECK_OP_IMPL(_GT, > ) // file is included). Save the current meaning now and use it // in the macro. typedef std::string _Check_string; -#define CHECK_OP_LOG(name, op, val1, val2, log) \ +#define CHECK_OP_LOG(name, op, val1, val2, log) \ while (@ac_google_namespace@::_Check_string* _result = \ @ac_google_namespace@::Check##name##Impl( \ @ac_google_namespace@::GetReferenceableValue(val1), \ @@ -663,11 +663,12 @@ typedef std::string _Check_string; #else // In optimized mode, use CheckOpString to hint to compiler that // the while condition is unlikely. -#define CHECK_OP_LOG(name, op, val1, val2, log) \ - while (@ac_google_namespace@::CheckOpString _result = \ - @ac_google_namespace@::Check##name##Impl(GetReferenceableValue(val1), \ - GetReferenceableValue(val2), \ - #val1 " " #op " " #val2)) \ +#define CHECK_OP_LOG(name, op, val1, val2, log) \ + while (@ac_google_namespace@::CheckOpString _result = \ + @ac_google_namespace@::Check##name##Impl( \ + @ac_google_namespace@::GetReferenceableValue(val1), \ + @ac_google_namespace@::GetReferenceableValue(val2), \ + #val1 " " #op " " #val2)) \ log(__FILE__, __LINE__, _result).stream() #endif // STATIC_ANALYSIS, !NDEBUG diff --git a/src/windows/glog/logging.h b/src/windows/glog/logging.h index 76017e2..f61ec4e 100755 --- a/src/windows/glog/logging.h +++ b/src/windows/glog/logging.h @@ -656,7 +656,7 @@ DEFINE_CHECK_OP_IMPL(_GT, > ) // file is included). Save the current meaning now and use it // in the macro. typedef std::string _Check_string; -#define CHECK_OP_LOG(name, op, val1, val2, log) \ +#define CHECK_OP_LOG(name, op, val1, val2, log) \ while (google::_Check_string* _result = \ google::Check##name##Impl( \ google::GetReferenceableValue(val1), \ @@ -667,11 +667,12 @@ typedef std::string _Check_string; #else // In optimized mode, use CheckOpString to hint to compiler that // the while condition is unlikely. -#define CHECK_OP_LOG(name, op, val1, val2, log) \ - while (google::CheckOpString _result = \ - google::Check##name##Impl(GetReferenceableValue(val1), \ - GetReferenceableValue(val2), \ - #val1 " " #op " " #val2)) \ +#define CHECK_OP_LOG(name, op, val1, val2, log) \ + while (google::CheckOpString _result = \ + google::Check##name##Impl( \ + google::GetReferenceableValue(val1), \ + google::GetReferenceableValue(val2), \ + #val1 " " #op " " #val2)) \ log(__FILE__, __LINE__, _result).stream() #endif // STATIC_ANALYSIS, !NDEBUG |