summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-03-22 09:46:02 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-03-22 09:46:02 +0100
commita0c44c8ef392b0cdef327e6aa35fc391bf1e7464 (patch)
treefb94d15347dc9b835417e5c194daaf6d4f103831 /tools
parent75716ac51b8555e77382a1c20a307477f0b43058 (diff)
slidecopy: +ENSURE_OR_CONTINUE/BREAK
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/diagnose_ex.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h
index 0d74195d6437..cd7f26c06b10 100644
--- a/tools/inc/tools/diagnose_ex.h
+++ b/tools/inc/tools/diagnose_ex.h
@@ -144,6 +144,24 @@
return; \
}
+/** asserts a given condition (in debug mode), and continues the most-inner
+ loop if the condition is not met
+*/
+#define ENSURE_OR_CONTINUE( c, m ) \
+ if ( !(c) ) \
+ { \
+ OSL_ENSURE( false, m ); \
+ continue; \
+ }
+/** asserts a given condition (in debug mode), and continues the most-inner
+ loop if the condition is not met
+*/
+#define ENSURE_OR_BREAK( c, m ) \
+ if ( !(c) ) \
+ { \
+ OSL_ENSURE( false, m ); \
+ break; \
+ }
#endif // TOOLS_DIAGNOSE_EX_H