]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/assert.hpp
Put brackets around ipv6 addresses in `inet6 present`
[factor.git] / vm / assert.hpp
index e45fdda09de47be4b0b8e83e41446dc896da4ee1..297e15bba8e64d540202a1563d8ff71983781d28 100644 (file)
@@ -1,16 +1,12 @@
-namespace factor
-{
-    void abort();
-}
+namespace factor { void abort(); }
 
-#ifndef NDEBUG
-#define FACTOR_ASSERT(condition) ((condition) \
-    ? (void)0 \
-    : ( \
-        ::fprintf(stderr, "assertion \"%s\" failed: file \"%s\", line %d\n", \
-            #condition, __FILE__, __LINE__), \
-        ::factor::abort() \
-    ))
+#ifdef FACTOR_DEBUG
+#define FACTOR_ASSERT(condition)                                               \
+  ((condition)                                                                 \
+       ? (void)0                                                               \
+       : (::fprintf(stderr, "assertion \"%s\" failed: file \"%s\", line %d\n", \
+                    #condition, __FILE__, __LINE__),                           \
+          ::factor::abort()))
 #else
 #define FACTOR_ASSERT(condition) ((void)0)
 #endif