]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/smobs.hh
Merge branch 'lilypond/translation'
[lilypond.git] / lily / include / smobs.hh
index 999f6cf231ea6c0c18f9782f9cb596c47e5286b1..cbf956b578ad2d09aaa144bec55f13505504f686 100644 (file)
@@ -156,13 +156,17 @@ extern bool parsed_objects_should_be_dead;
 
 #ifndef NDEBUG
 #define ASSERT_LIVE_IS_ALLOWED()     \
-  static bool passed_here_once;\
-  if (parsed_objects_should_be_dead && !passed_here_once) { \
-    ::programming_error (string ("Parsed object should be dead: ")  + __PRETTY_FUNCTION__ ); \
-    passed_here_once = true;\
-  }    
+  do { \
+    static bool passed_here_once;\
+    if (parsed_objects_should_be_dead && !passed_here_once) { \
+      ::programming_error (string ("Parsed object should be dead: ")  + __PRETTY_FUNCTION__ ); \
+      passed_here_once = true;\
+    } \
+  } \
+  while (0)
 #else
-#define ASSERT_LIVE_IS_ALLOWED() {};
+#define ASSERT_LIVE_IS_ALLOWED() do { } \
+  while (0)
 #endif
 
 #endif /* SMOBS_HH */