Skip to content

Commit 06f7987

Browse files
lukaszgotszaldintelsys_zuul
authored andcommitted
update IGC Probe assertion macro
Change-Id: If7b651610420b699e10cfce66b5419697841d493
1 parent 1828773 commit 06f7987

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

IGC/Probe/Assertion.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,24 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424
2525
======================= end_copyright_notice ==================================*/
2626

27-
#ifndef IGC_PROBE_H
28-
#define IGC_PROBE_H
27+
#ifndef IGC_PROBE_ASSERTION_H
28+
#define IGC_PROBE_ASSERTION_H
2929

3030

3131
#include <cassert>
3232
#include <cstdlib>
3333

3434
#define IGC_ASSERT assert
35-
#define IGC_ASSERT_EXIT(x) do { if(0 == (x)) { assert(0); exit(EXIT_FAILURE); } } while(0)
3635

36+
#define IGC_ASSERT_EXIT(x) \
37+
do \
38+
{ \
39+
if(0 == (x)) \
40+
{ \
41+
assert(0); \
42+
exit(EXIT_FAILURE); \
43+
} \
44+
} while(0)
3745

38-
#endif // IGC_PROBE_H
46+
47+
#endif // IGC_PROBE_ASSERTION_H

0 commit comments

Comments
 (0)