Replace the M_ASSERT(0) by M_ASSUME(0) since they are not reachable (in order to inform the compiler of this fact)

This commit is contained in:
Patrick Pelissier committed 2023-03-05 00:50:40 +01:00
1 parent 2fc31d8c12
commit c35aa9c891
2 files changed
+14 -14

No files matched your search

+2 -2
View File
@@ -380,7 +380,7 @@ namespace m_lib {
switch (i) { \
case 0: return 0; \
M_MAP2(M_TUPL3_DEFINE_CMP_ORDER_FUNC , name, __VA_ARGS__) \
default: M_ASSERT(0); \
default: M_ASSUME(0); \
} \
} \
}
@@ -584,7 +584,7 @@ namespace m_lib {
M_ASSERT (index >= 0 && index < field_max); \
switch (1+index) { \
M_MAP2(M_TUPL3_DEFINE_IN_SERIAL_FUNC , name, __VA_ARGS__) \
default: M_ASSERT(0); \
default: M_ASSUME(0); \
} \
ret = (ret == M_SERIAL_OK_DONE) ? M_SERIAL_OK_CONTINUE : M_SERIAL_FAIL; \
} \