19 lines
528 B
C++
19 lines
528 B
C++
#pragma once
|
|
#include "spdlog/spdlog.h"
|
|
|
|
#ifdef core_EXPORTS
|
|
#define CORE_API __declspec(dllexport)
|
|
#else
|
|
#define CORE_API __declspec(dllimport)
|
|
#endif
|
|
|
|
#if defined(_DEBUG) || defined(DEBUG)
|
|
#define checkf(expr, msg, ...) if (!(expr)) { spdlog::error(msg, __VA_ARGS__); throw std::runtime_error(fmt::format(msg, __VA_ARGS__)); }
|
|
#define check(expr) if (!(expr)) { spdlog::error("Check failed: {}", #expr); throw std::runtime_error(fmt::format("Check failed: {}", #expr)); }
|
|
#else
|
|
#define checkf(...)
|
|
#define check(...)
|
|
#endif
|
|
|
|
|