commit b95b107d93d7b65bfbb5446881be2f251b7c5dcb parent d5b9d3284db2e4f04ef3be41f6a5deef161b5bb3 Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev> Date: Wed, 8 Jul 2026 23:30:09 +0200 mhd_assume.h: used proper description in doxy Diffstat:
| M | src/mhd2/mhd_assume.h | | | 14 | ++++++++------ |
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/mhd2/mhd_assume.h b/src/mhd2/mhd_assume.h @@ -54,12 +54,14 @@ #endif /** - * mhd_ASSUME() should be used in locations where it is known in advance - * that the code must be not reachable. - * It should give compiler a hint to exclude some code paths from the final - * binary. - * In debug builds this macro converted to assert() to ensure that expectation - * is always correct. + * mhd_ASSUME() should be used in locations where the given statement is known + * in advance to be always 'true'. + * It gives the compiler a hint that it may assume the statement to be true, + * helping it to optimise the code (for example, to drop impossible branches). + * In debug builds this macro is converted to assert() to ensure that the + * expectation is always correct. + * The statement must have no side effects: it may not be evaluated at all in + * non-debug builds. */ #ifdef NDEBUG # ifdef MHD_ASSUME_KEYWORD