| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008 Travis Geiselbrecht | 2 * Copyright (c) 2008 Travis Geiselbrecht |
| 3 * | 3 * |
| 4 * Permission is hereby granted, free of charge, to any person obtaining | 4 * Permission is hereby granted, free of charge, to any person obtaining |
| 5 * a copy of this software and associated documentation files | 5 * a copy of this software and associated documentation files |
| 6 * (the "Software"), to deal in the Software without restriction, | 6 * (the "Software"), to deal in the Software without restriction, |
| 7 * including without limitation the rights to use, copy, modify, merge, | 7 * including without limitation the rights to use, copy, modify, merge, |
| 8 * publish, distribute, sublicense, and/or sell copies of the Software, | 8 * publish, distribute, sublicense, and/or sell copies of the Software, |
| 9 * and to permit persons to whom the Software is furnished to do so, | 9 * and to permit persons to whom the Software is furnished to do so, |
| 10 * subject to the following conditions: | 10 * subject to the following conditions: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 #if LK_DEBUGLEVEL > 1 | 32 #if LK_DEBUGLEVEL > 1 |
| 33 #define DEBUG_ASSERT(x) \ | 33 #define DEBUG_ASSERT(x) \ |
| 34 do { if (unlikely(!(x))) { panic("DEBUG ASSERT FAILED at (%s:%d): %s\n", __F
ILE__, __LINE__, #x); } } while (0) | 34 do { if (unlikely(!(x))) { panic("DEBUG ASSERT FAILED at (%s:%d): %s\n", __F
ILE__, __LINE__, #x); } } while (0) |
| 35 #else | 35 #else |
| 36 #define DEBUG_ASSERT(x) \ | 36 #define DEBUG_ASSERT(x) \ |
| 37 do { } while(0) | 37 do { } while(0) |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 #define assert(e) DEBUG_ASSERT(e) | 40 #define assert(e) DEBUG_ASSERT(e) |
| 41 |
| 42 #ifndef __cplusplus |
| 41 #define static_assert(e) STATIC_ASSERT(e) | 43 #define static_assert(e) STATIC_ASSERT(e) |
| 44 #endif |
| 42 | 45 |
| 43 #endif | 46 #endif |
| OLD | NEW |