summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-30 12:20:58 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:34 -0400
commit18aaf588ab55dfef5556e27ab69491f4c77ad303 (patch)
tree2a0d2d3afb537d93f23085f0b9cbe6b9cf8562a4 /src/utils.h
parent21af83013f3b1bae511a61b9e27224ab3de235c1 (diff)
downloadfork-ledger-18aaf588ab55dfef5556e27ab69491f4c77ad303.tar.gz
fork-ledger-18aaf588ab55dfef5556e27ab69491f4c77ad303.tar.bz2
fork-ledger-18aaf588ab55dfef5556e27ab69491f4c77ad303.zip
Added use of boost::optional<> to amount.h
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h51
1 files changed, 31 insertions, 20 deletions
diff --git a/src/utils.h b/src/utils.h
index 8be512fb..da6aaa27 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -5,6 +5,26 @@
/**********************************************************************
*
+ * Default values
+ */
+
+#if defined(FULL_DEBUG)
+#define VERIFY_ON 1
+#define TRACING_ON 1
+#define DEBUG_ON 1
+#define TIMERS_ON 1
+#define FREE_MEMORY 1
+#elif defined(NO_DEBUG)
+#define NO_ASSERTS 1
+#define NO_LOGGING 1
+#else
+#define VERIFY_ON 1 // compiled in, use --verify to enable
+#define TRACING_ON 1 // use --trace X to enable
+#define TIMERS_ON 1
+#endif
+
+/**********************************************************************
+ *
* Forward declarations
*/
@@ -31,26 +51,6 @@ namespace ledger {
/**********************************************************************
*
- * Default values
- */
-
-#if defined(FULL_DEBUG)
-#define VERIFY_ON 1
-#define TRACING_ON 1
-#define DEBUG_ON 1
-#define TIMERS_ON 1
-#define FREE_MEMORY 1
-#elif defined(NO_DEBUG)
-#define NO_ASSERTS 1
-#define NO_LOGGING 1
-#else
-#define VERIFY_ON 1 // compiled in, use --verify to enable
-#define TRACING_ON 1 // use --trace X to enable
-#define TIMERS_ON 1 // jww (2007-04-25): is this correct?
-#endif
-
-/**********************************************************************
- *
* Assertions
*/
@@ -72,6 +72,10 @@ namespace ledger {
((x) ? ((void)0) : debug_assert(#x, BOOST_CURRENT_FUNCTION, \
__FILE__, __LINE__))
+#else // ! ASSERTS_ON
+
+#define assert(x)
+
#endif // ASSERTS_ON
/**********************************************************************
@@ -431,6 +435,13 @@ inline void throw_unexpected_error(char c, char wanted) {
/**********************************************************************
*
+ * Date/time support classes
+ */
+
+#include "times.h"
+
+/**********************************************************************
+ *
* General utility functions
*/