lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5962] Remove the problem identified 20141005T2318Z, and a


From: Greg Chicares
Subject: [lmi-commits] [5962] Remove the problem identified 20141005T2318Z, and a congener
Date: Sun, 05 Oct 2014 23:20:15 +0000

Revision: 5962
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5962
Author:   chicares
Date:     2014-10-05 23:20:15 +0000 (Sun, 05 Oct 2014)
Log Message:
-----------
Remove the problem identified 20141005T2318Z, and a congener

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/alert.hpp
    lmi/trunk/assert_lmi.hpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2014-10-05 23:18:36 UTC (rev 5961)
+++ lmi/trunk/ChangeLog 2014-10-05 23:20:15 UTC (rev 5962)
@@ -34218,3 +34218,15 @@
 Robustify. See:
   http://lists.nongnu.org/archive/html/lmi/2014-10/msg00008.html
 
+20141005T2318Z <address@hidden> [533]
+
+  assert_lmi_test.cpp
+Demonstrate a latent problem.
+
+20141005T2320Z <address@hidden> [533]
+
+  alert.hpp
+  assert_lmi.hpp
+Remove the problem identified 20141005T2318Z, and a congener. See:
+  http://lists.nongnu.org/archive/html/lmi/2014-10/msg00009.html
+

Modified: lmi/trunk/alert.hpp
===================================================================
--- lmi/trunk/alert.hpp 2014-10-05 23:18:36 UTC (rev 5961)
+++ lmi/trunk/alert.hpp 2014-10-05 23:20:15 UTC (rev 5962)
@@ -266,15 +266,18 @@
 /// TODO ?? It is generally a bad idea to let users bypass assertions.
 /// Any apparent need to do this probably masks a logic error.
 
-#define HOPEFULLY(condition)                                \
-    if(!(condition))                                        \
-        {                                                   \
-        hobsons_choice()                                    \
-            << "Assertion '" << (#condition) << "' failed." \
-            << LMI_FLUSH                                    \
-            ;                                               \
-        }                                                   \
-    do {} while(0)
+#define HOPEFULLY(condition)                                    \
+    do                                                          \
+        {                                                       \
+        if(!(condition))                                        \
+            {                                                   \
+            hobsons_choice()                                    \
+                << "Assertion '" << (#condition) << "' failed." \
+                << LMI_FLUSH                                    \
+                ;                                               \
+            }                                                   \
+        }                                                       \
+    while(0)
 
 #endif // alert_hpp
 

Modified: lmi/trunk/assert_lmi.hpp
===================================================================
--- lmi/trunk/assert_lmi.hpp    2014-10-05 23:18:36 UTC (rev 5961)
+++ lmi/trunk/assert_lmi.hpp    2014-10-05 23:20:15 UTC (rev 5962)
@@ -43,18 +43,21 @@
 ///
 /// For a more-elaborate runtime-error facility, see 'alert*.?pp'.
 
-#define LMI_ASSERT(condition)                               \
-    if(!(condition))                                        \
-        {                                                   \
-        std::ostringstream oss;                             \
-        oss                                                 \
-            << "Assertion '" << (#condition) << "' failed." \
-            << "\n[file " << __FILE__                       \
-            << ", line " << __LINE__ << "]\n"               \
-            ;                                               \
-        throw std::runtime_error(oss.str());                \
-        }                                                   \
-    do {} while(0)
+#define LMI_ASSERT(condition)                                   \
+    do                                                          \
+        {                                                       \
+        if(!(condition))                                        \
+            {                                                   \
+            std::ostringstream oss;                             \
+            oss                                                 \
+                << "Assertion '" << (#condition) << "' failed." \
+                << "\n[file " << __FILE__                       \
+                << ", line " << __LINE__ << "]\n"               \
+                ;                                               \
+            throw std::runtime_error(oss.str());                \
+            }                                                   \
+        }                                                       \
+    while(0)
 
 #endif // assert_lmi_hpp
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]