From a4261d25e5f191184dbc37c32346343c5cb5b166 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 5 Jun 2024 12:02:40 +0200 Subject: fix msvc link failure --- editor/imgui-raii.cpp | 6 +++++- editor/imgui-raii.hpp | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/editor/imgui-raii.cpp b/editor/imgui-raii.cpp index b5997c7b..4c4b5911 100644 --- a/editor/imgui-raii.cpp +++ b/editor/imgui-raii.cpp @@ -160,6 +160,10 @@ raii_wrapper begin_child(StringView name, const ImVec2& size, int flags, int win return {&ImGui::EndChild}; } +} // namespace floormat::imgui + +namespace floormat::imgui::detail { + const char* label_left_(StringView label, char* buf, size_t buf_len, float width); const char* label_left_(StringView label, char* buf, size_t buf_len, float width) @@ -173,4 +177,4 @@ const char* label_left_(StringView label, char* buf, size_t buf_len, float width return buf; } -} // namespace floormat::imgui +} // namespace floormat::imgui::detail diff --git a/editor/imgui-raii.hpp b/editor/imgui-raii.hpp index 59134deb..63738113 100644 --- a/editor/imgui-raii.hpp +++ b/editor/imgui-raii.hpp @@ -67,11 +67,12 @@ private: float font_size; }; +namespace detail { const char* label_left_(StringView, char*, size_t, float); } + template const char* label_left(StringView label, char(&buf)[N], float width) { - const char* label_left_(StringView, char*, size_t, float); - return label_left_(label, static_cast(buf), N, width); + return detail::label_left_(label, static_cast(buf), N, width); } } // namespace floormat::imgui -- cgit v1.2.3