- Timestamp:
- Nov 17, 2009 4:49:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assert.h
r21792 r24729 379 379 380 380 381 /** @def AssertStmt 382 * Assert that an expression is true. If false, hit breakpoint and execute the 383 * statement. 384 * @param expr Expression which should be true. 385 * @param stmt Statement to execute on failure. 386 */ 387 #ifdef RT_STRICT 388 # define AssertStmt(expr, stmt) \ 389 do { \ 390 if (RT_UNLIKELY(!(expr))) \ 391 { \ 392 AssertMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \ 393 RTAssertPanic(); \ 394 stmt; \ 395 } \ 396 } while (0) 397 #else 398 # define AssertStmt(expr, stmt) \ 399 do { \ 400 if (RT_UNLIKELY(!(expr))) \ 401 { \ 402 stmt; \ 403 } \ 404 } while (0) 405 #endif 406 407 381 408 /** @def AssertReturn 382 409 * Assert that an expression is true and returns if it isn't.
Note:
See TracChangeset
for help on using the changeset viewer.