summaryrefslogtreecommitdiff
path: root/lib/gras_impl/debug.hpp
diff options
context:
space:
mode:
authorJosh Blum2012-09-12 10:58:52 -0700
committerJosh Blum2012-09-12 10:58:52 -0700
commit081b95b570e06c3130aaf979b0feaae159901c9b (patch)
tree7ce9583ee2d1fdea3e0b2c157c11aa42aea44b1c /lib/gras_impl/debug.hpp
parent2ec9308d16e8fa83c2a7ecd3a14d14b7a4665c3f (diff)
downloadsandhi-081b95b570e06c3130aaf979b0feaae159901c9b.tar.gz
sandhi-081b95b570e06c3130aaf979b0feaae159901c9b.tar.bz2
sandhi-081b95b570e06c3130aaf979b0feaae159901c9b.zip
buffer size tweaks and ifdef for disabling asserts
Diffstat (limited to 'lib/gras_impl/debug.hpp')
-rw-r--r--lib/gras_impl/debug.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gras_impl/debug.hpp b/lib/gras_impl/debug.hpp
index 210ac7a..c235c1f 100644
--- a/lib/gras_impl/debug.hpp
+++ b/lib/gras_impl/debug.hpp
@@ -24,13 +24,18 @@
#define ARMAGEDDON 0
#define MESSAGE 0
#define WORK 0
+#define ASSERTING 0
#define HERE() std::cerr << __FILE__ << ":" << __LINE__ << std::endl << std::flush;
#define VAR(x) std::cerr << #x << " = " << (x) << std::endl << std::flush;
+#ifdef ASSERTING
#define ASSERT(x) {if(not (x)) \
{ \
std::cerr << "ASSERT FAIL " << __FILE__ << ":" << __LINE__ << "\n\t" << #x << std::endl << std::flush; \
throw std::runtime_error(std::string("ASSERT FAIL ") + #x); \
}}
+#else
+#define ASSERT(x)
+#endif
#endif /*INCLUDED_LIBGRAS_IMPL_DEBUG_HPP*/