Changeset 8579 in vbox for trunk/include/iprt/assert.h
- Timestamp:
- May 5, 2008 1:54:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assert.h
r8578 r8579 292 292 293 293 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 294 315 /** @def AssertBreakStmt 295 316 * Assert that an expression is true and breaks if it isn't. … … 313 334 break; \ 314 335 } else do {} while (0) 315 #endif316 317 /** @def AssertBreakVoid318 * 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_STRICT326 # 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 #else334 # define AssertBreakVoid(expr) \335 if (RT_UNLIKELY(!(expr))) \336 break; \337 else do {} while (0)338 336 #endif 339 337
Note:
See TracChangeset
for help on using the changeset viewer.