瀏覽代碼

base: assertion errors now mention source location.

legacy
Sam Hocevar sam 11 年之前
父節點
當前提交
82c0dd22a4
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      src/lol/base/assert.h

+ 3
- 3
src/lol/base/assert.h 查看文件

@@ -102,13 +102,13 @@ static inline void DebugAbort()
*/

#define LOL_ERROR_1(t) \
Log::Error("assertion failure: " #t "\n")
Log::Error("assertion at %s:%d: %s\n", __FILE__, __LINE__, #t)

#define LOL_ERROR_2(t, s) \
Log::Error("assertion failure: %s\n", s)
Log::Error("assertion at %s:%d: %s\n", __FILE__, __LINE__, s)

#define LOL_ERROR_3(t, s, ...) \
Log::Error("assertion failure: " s "\n", __VA_ARGS__)
Log::Error("assertion at %s:%d: " s "\n", __FILE__, __LINE__, __VA_ARGS__)

#if FINAL_RELEASE
# define ASSERT(...) UNUSED(LOL_CALL(LOL_1ST, (__VA_ARGS__)))


Loading…
取消
儲存