Removed tweak options and spdlog_config.h

This commit is contained in:
gabime
2024-11-30 19:55:45 +02:00
parent 21e0810791
commit 3c9963a495
14 changed files with 47 additions and 124 deletions

View File

@@ -15,7 +15,7 @@
#include <type_traits>
#include "./source_loc.h"
#include "./spdlog_config.h"
#if defined(SPDLOG_SHARED_LIB)
#if defined(_WIN32)
@@ -40,22 +40,6 @@
#define SPDLOG_FUNCTION static_cast<const char *>(__FUNCTION__)
#endif
#ifdef SPDLOG_NO_EXCEPTIONS
#define SPDLOG_TRY
#define SPDLOG_THROW(ex) \
do { \
printf("spdlog fatal error: %s\n", ex.what()); \
std::abort(); \
} while (0)
#define SPDLOG_CATCH_STD
#else
#define SPDLOG_TRY try
#define SPDLOG_THROW(ex) throw(ex)
#define SPDLOG_CATCH_STD \
catch (const std::exception &) { \
}
#endif
namespace spdlog {
class formatter;
@@ -106,11 +90,7 @@ enum class level {
n_levels
};
#if defined(SPDLOG_NO_ATOMIC_LEVELS)
using atomic_level_t = details::null_atomic<level>;
#else
using atomic_level_t = std::atomic<level>;
#endif
[[nodiscard]] constexpr size_t level_to_number(level lvl) noexcept { return static_cast<size_t>(lvl); }