* mln/core/contract.hh: Cast expression to bool.
---
milena/ChangeLog | 6 ++++++
milena/mln/core/contract.hh | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index aa7d3fa..048b97a 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -12,6 +12,12 @@
* mln/level/transform.hh,
* mln/level/paste.hh: Rename routines.
+2008-10-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix assertion failures on Mac.
+
+ * mln/core/contract.hh: Cast expression to bool.
+
2008-10-26 Guillaume Lazzara <z(a)lrde.epita.fr>
Use a more explicit name for the method used to retrieve the graph
diff --git a/milena/mln/core/contract.hh b/milena/mln/core/contract.hh
index e7a1a3b..5d03057 100644
--- a/milena/mln/core/contract.hh
+++ b/milena/mln/core/contract.hh
@@ -46,16 +46,16 @@
#endif
/// Assertion.
-# define mln_assertion(expr) assert(expr)
+# define mln_assertion(expr) assert((bool)(expr))
/// Invariant.
-# define mln_invariant(expr) assert(expr)
+# define mln_invariant(expr) assert((bool)(expr))
/// Precondition.
-# define mln_precondition(expr) assert(expr)
+# define mln_precondition(expr) assert((bool)(expr))
/// Postcondition.
-# define mln_postcondition(expr) assert(expr)
+# define mln_postcondition(expr) assert((bool)(expr))
namespace mln
--
1.5.6.5
Show replies by date