Hi,
The below code is a part of project (opensource code), kindly I have 3 Questions:
1) why do they write a (\) at end of each line?
2) what does while(0) mean?
3) they use expr as a parameter without any declaration of it, then when they call this function such as:
vlr = csmap->vlr;
ogs_assert(val);
the question is: can we consider a expr as a type of variable like (int, double..)
|
Code:
#define ogs_assert(expr) \
do {
if (ogs_likely(expr));
else {
ogs_fatal("%s: Assertion `%s' failed.", OGS_FUNC,
#expr); \
ogs_abort();}
} while (0)