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/sinks/msvc_sink.h | 68 ----------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 deps/include/spdlog/sinks/msvc_sink.h (limited to 'deps/include/spdlog/sinks/msvc_sink.h') diff --git a/deps/include/spdlog/sinks/msvc_sink.h b/deps/include/spdlog/sinks/msvc_sink.h deleted file mode 100644 index 2b5d5b8..0000000 --- a/deps/include/spdlog/sinks/msvc_sink.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright(c) 2016 Alexander Dalshov & spdlog contributors. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) - -#pragma once - -#if defined(_WIN32) - - #include - #if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) - #include - #endif - #include - - #include - #include - - // Avoid including windows.h (https://stackoverflow.com/a/30741042) - #if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) -extern "C" __declspec(dllimport) void __stdcall OutputDebugStringW(const wchar_t *lpOutputString); - #else -extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char *lpOutputString); - #endif -extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); - -namespace spdlog { -namespace sinks { -/* - * MSVC sink (logging using OutputDebugStringA) - */ -template -class msvc_sink : public base_sink { -public: - msvc_sink() = default; - msvc_sink(bool check_debugger_present) - : check_debugger_present_{check_debugger_present} {} - -protected: - void sink_it_(const details::log_msg &msg) override { - if (check_debugger_present_ && !IsDebuggerPresent()) { - return; - } - memory_buf_t formatted; - base_sink::formatter_->format(msg, formatted); - formatted.push_back('\0'); // add a null terminator for OutputDebugString - #if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) - wmemory_buf_t wformatted; - details::os::utf8_to_wstrbuf(string_view_t(formatted.data(), formatted.size()), wformatted); - OutputDebugStringW(wformatted.data()); - #else - OutputDebugStringA(formatted.data()); - #endif - } - - void flush_() override {} - - bool check_debugger_present_ = true; -}; - -using msvc_sink_mt = msvc_sink; -using msvc_sink_st = msvc_sink; - -using windebug_sink_mt = msvc_sink_mt; -using windebug_sink_st = msvc_sink_st; - -} // namespace sinks -} // namespace spdlog - -#endif -- cgit