mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-05 05:58:19 +01:00
Common: Remove src/common/logging/log.*
This commit is contained in:
parent
07eaf100ba
commit
181f78f36e
13 changed files with 124 additions and 222 deletions
|
|
@ -4,10 +4,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "common/logging/log.h"
|
||||
|
||||
// For asserts we'd like to keep all the junk executed when an assert happens away from the
|
||||
// important code in the function. One way of doing this is to put all the relevant code inside a
|
||||
// lambda and force the compiler to not inline it. Unfortunately, MSVC seems to have no syntax to
|
||||
|
|
@ -28,13 +27,13 @@ static void assert_noinline_call(const Fn& fn) {
|
|||
|
||||
#define ASSERT(_a_) \
|
||||
do if (!(_a_)) { assert_noinline_call([] { \
|
||||
LOG_CRITICAL(Debug, "Assertion Failed!"); \
|
||||
fprintf(stderr, "Assertion Failed!\n" #_a_); \
|
||||
throw ""; \
|
||||
}); } while (0)
|
||||
|
||||
#define ASSERT_MSG(_a_, ...) \
|
||||
do if (!(_a_)) { assert_noinline_call([&] { \
|
||||
LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); \
|
||||
fprintf(stderr, "Assertion Failed!\n" #_a_ "\n" __VA_ARGS__); \
|
||||
throw ""; \
|
||||
}); } while (0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue