From 61e5bcef2629e2d68b805a956a96fff264d4f74d Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 28 Jun 2025 01:59:49 +0500 Subject: Restructure dependencies and update to C++20 - Nuked static_assert from almost everywhere in the project - Nuked binary dependency support. Might add one later though - Separated dependency headers into a separate include subdirectory - Grafted a thirdpartylegalnotices.txt generator from RITEG - Pushed development snapshot version to 2126 (26th week of 2025) --- deps/include/spdlog/common-inl.h | 68 ---------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 deps/include/spdlog/common-inl.h (limited to 'deps/include/spdlog/common-inl.h') diff --git a/deps/include/spdlog/common-inl.h b/deps/include/spdlog/common-inl.h deleted file mode 100644 index de3990c..0000000 --- a/deps/include/spdlog/common-inl.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright(c) 2015-present, Gabi Melman & spdlog contributors. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) - -#pragma once - -#ifndef SPDLOG_HEADER_ONLY - #include -#endif - -#include -#include - -namespace spdlog { -namespace level { - -#if __cplusplus >= 201703L -constexpr -#endif - static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES; - -static const char *short_level_names[] SPDLOG_SHORT_LEVEL_NAMES; - -SPDLOG_INLINE const string_view_t &to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT { - return level_string_views[l]; -} - -SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT { - return short_level_names[l]; -} - -SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT { - auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name); - if (it != std::end(level_string_views)) - return static_cast(std::distance(std::begin(level_string_views), it)); - - // check also for "warn" and "err" before giving up.. - if (name == "warn") { - return level::warn; - } - if (name == "err") { - return level::err; - } - return level::off; -} -} // namespace level - -SPDLOG_INLINE spdlog_ex::spdlog_ex(std::string msg) - : msg_(std::move(msg)) {} - -SPDLOG_INLINE spdlog_ex::spdlog_ex(const std::string &msg, int last_errno) { -#ifdef SPDLOG_USE_STD_FORMAT - msg_ = std::system_error(std::error_code(last_errno, std::generic_category()), msg).what(); -#else - memory_buf_t outbuf; - fmt::format_system_error(outbuf, last_errno, msg.c_str()); - msg_ = fmt::to_string(outbuf); -#endif -} - -SPDLOG_INLINE const char *spdlog_ex::what() const SPDLOG_NOEXCEPT { return msg_.c_str(); } - -SPDLOG_INLINE void throw_spdlog_ex(const std::string &msg, int last_errno) { - SPDLOG_THROW(spdlog_ex(msg, last_errno)); -} - -SPDLOG_INLINE void throw_spdlog_ex(std::string msg) { SPDLOG_THROW(spdlog_ex(std::move(msg))); } - -} // namespace spdlog -- cgit