diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-03-22 09:46:02 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-03-22 09:46:02 +0100 |
commit | a0c44c8ef392b0cdef327e6aa35fc391bf1e7464 (patch) | |
tree | fb94d15347dc9b835417e5c194daaf6d4f103831 /tools | |
parent | 75716ac51b8555e77382a1c20a307477f0b43058 (diff) |
slidecopy: +ENSURE_OR_CONTINUE/BREAK
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/diagnose_ex.h | 18 |
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 |