summaryrefslogtreecommitdiffstats
path: root/lisiblepng/src/lisiblepng/assert.h
blob: 1de9c3635a637b100d1949bce8d24427e538faad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef LISIBLE_PNG_ASSET_H
#define LISIBLE_PNG_ASSET_H

#include "log.h"

#define ASSERT(predicate)                                                      \
  do {                                                                         \
    if (!(predicate)) {                                                        \
      LPNG_LOG_ERR("Assertion failed in %s:%d:\n\t%s", __FILE__, __LINE__,     \
                   #predicate);                                                \
      exit(1);                                                                 \
    }                                                                          \
  } while (0)

#endif // LISIBLE_PNG_ASSET_H
Go back to lisible.xyz