From 21779fe84d37aaa5896e65e63f2487e0605ef51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=92=80=E5=A2=83=E7=9F=B3?= Date: Sat, 25 Feb 2023 20:58:31 +0800 Subject: [PATCH] msvc_sink: string_view_t from memory_buf_t --- include/spdlog/sinks/msvc_sink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/sinks/msvc_sink.h b/include/spdlog/sinks/msvc_sink.h index 88dcd91d..34d5f34e 100644 --- a/include/spdlog/sinks/msvc_sink.h +++ b/include/spdlog/sinks/msvc_sink.h @@ -48,7 +48,7 @@ protected: 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({formatted.data(), formatted.size()}, wformatted); + details::os::utf8_to_wstrbuf(string_view_t(formatted.data(), formatted.size()), wformatted); OutputDebugStringW(wformatted.data()); #else OutputDebugStringA(formatted.data());