VirtualBox

Changeset 8579 in vbox for trunk/include/iprt/assert.h


Ignore:
Timestamp:
May 5, 2008 1:54:26 PM (17 years ago)
Author:
vboxsync
Message:

AssertBreakVoid -> AssertBreak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/assert.h

    r8578 r8579  
    292292
    293293
     294/** @def AssertBreak
     295 * Assert that an expression is true and breaks if it isn't.
     296 * In RT_STRICT mode it will hit a breakpoint before returning.
     297 *
     298 * @param   expr    Expression which should be true.
     299 */
     300#ifdef RT_STRICT
     301# define AssertBreak(expr) \
     302    if (RT_UNLIKELY(!(expr))) \
     303    { \
     304        AssertMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
     305        AssertBreakpoint(); \
     306        break; \
     307    } else do {} while (0)
     308#else
     309# define AssertBreak(expr) \
     310    if (RT_UNLIKELY(!(expr))) \
     311        break; \
     312    else do {} while (0)
     313#endif
     314
    294315/** @def AssertBreakStmt
    295316 * Assert that an expression is true and breaks if it isn't.
     
    313334        break; \
    314335    } else do {} while (0)
    315 #endif
    316 
    317 /** @def AssertBreakVoid
    318  * Assert that an expression is true and breaks if it isn't.
    319  * In RT_STRICT mode it will hit a breakpoint before returning.
    320  *
    321  * @param   expr    Expression which should be true.
    322  * @todo Rename to AssertBreak.
    323  * @todo broken, use if.
    324  */
    325 #ifdef RT_STRICT
    326 # define AssertBreakVoid(expr) \
    327     if (RT_UNLIKELY(!(expr))) \
    328     { \
    329         AssertMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
    330         AssertBreakpoint(); \
    331         break; \
    332     } else do {} while (0)
    333 #else
    334 # define AssertBreakVoid(expr) \
    335     if (RT_UNLIKELY(!(expr))) \
    336         break; \
    337     else do {} while (0)
    338336#endif
    339337
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette