-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.hpp
24 lines (20 loc) · 977 Bytes
/
util.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef ELF_UTIL_HPP
#define ELF_UTIL_HPP
#include <windows.h>
#include <iostream>
#include <fmt/format.h>
#define CHECK(cond, Format, ...) \
{ \
if (!(cond)) { \
std::string log = fmt::format(Format, ##__VA_ARGS__); \
std::cout << __FILE__ << " " << __LINE__ << " " << log; \
Sleep(1000); \
exit(0); \
} \
}
#define LOG(Format, ...) \
{ \
std::string log = fmt::format(Format, ##__VA_ARGS__); \
std::cout << __FILE__ << " " << __LINE__ << " " << log << std::endl; \
}
#endif // ELF_UTIL_HPP