diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-06-27 15:01:21 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-06-27 16:46:22 -0400 |
commit | 5d5038723c202b04272f14abc64e7b6a0bbe2979 (patch) | |
tree | 714d8586095c986eccc684859fd34c61874f2869 /src/util/exception.h | |
parent | a399bd138c387820e0d441372a7dbe7bee1dd0f4 (diff) |
Remove macros EXPECT_TRUE / EXPECT_FALSE from cvc4_public.h so that they don't escape to user space
Thanks to Alex Horn for raising the issue on the CVC-BUGS mailing list.
Diffstat (limited to 'src/util/exception.h')
-rw-r--r-- | src/util/exception.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/exception.h b/src/util/exception.h index 082a50ef2..cd4b763ef 100644 --- a/src/util/exception.h +++ b/src/util/exception.h @@ -138,13 +138,13 @@ namespace CVC4 { #ifndef CheckArgument template <class T> inline void CheckArgument(bool cond, const T& arg, const char* fmt, ...) CVC4_PUBLIC; template <class T> inline void CheckArgument(bool cond, const T& arg, const char* fmt, ...) { - if(EXPECT_FALSE( !cond )) { \ + if(__builtin_expect( ( !cond ), false )) { \ throw ::CVC4::IllegalArgumentException("", "", ""); \ } \ } template <class T> inline void CheckArgument(bool cond, const T& arg) CVC4_PUBLIC; template <class T> inline void CheckArgument(bool cond, const T& arg) { - if(EXPECT_FALSE( !cond )) { \ + if(__builtin_expect( ( !cond ), false )) { \ throw ::CVC4::IllegalArgumentException("", "", ""); \ } \ } @@ -153,13 +153,13 @@ template <class T> inline void CheckArgument(bool cond, const T& arg) { #ifndef DebugCheckArgument template <class T> inline void DebugCheckArgument(bool cond, const T& arg, const char* fmt, ...) CVC4_PUBLIC; template <class T> inline void DebugCheckArgument(bool cond, const T& arg, const char* fmt, ...) { - if(EXPECT_FALSE( !cond )) { \ + if(__builtin_expect( ( !cond ), false )) { \ throw ::CVC4::IllegalArgumentException("", "", ""); \ } \ } template <class T> inline void DebugCheckArgument(bool cond, const T& arg) CVC4_PUBLIC; template <class T> inline void DebugCheckArgument(bool cond, const T& arg) { - if(EXPECT_FALSE( !cond )) { \ + if(__builtin_expect( ( !cond ), false )) { \ throw ::CVC4::IllegalArgumentException("", "", ""); \ } \ } |