]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Log.hh
considerable refactoring
[chaz/yoink] / src / Moof / Log.hh
index d3e4009c4a5a43f59393a8302922e9995f12bea0..3f6b6d7e45013b8360af975288d03082c6ed0d91 100644 (file)
  */
 
 #include <cstdlib>             // exit
-#include <cerrno>              // errno
 #include <cstring>             // strerror
 
 
-namespace Mf {
-
-
 /**
  * Macro which tests an assertion and issues an logError() and exits if false.
- * This differs from the standard assert() in that this is a runtime assertion
- * test and will always be compiled in.
  * @param X test to perform
  */
 
-#define ASSERT(X) if (!(X)) logError("false assertion at %s:%d, " #X \
-               " (errno: %d, %s)", __FILE__, __LINE__, errno, strerror(errno)), exit(1)
+#if ! NDEBUG
+#define ASSERT(X) if (!(X)) Mf::logError("false assertion at %s:%d, " #X, \
+               __FILE__, __LINE__), exit(1)
+#else
+#define ASSERT(X)
+#endif
+
+
+namespace Mf {
 
 
 /**
This page took 0.019968 seconds and 4 git commands to generate.