From 2ff5bc5c0f77af603b971af214b5abda6696a337 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 27 May 2021 12:57:50 -0400 Subject: [PATCH] Fix ImGuiStringViewText on MSVC --- Runtime/ImGuiConsole.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Runtime/ImGuiConsole.cpp b/Runtime/ImGuiConsole.cpp index 11cc464c3..ec525c4c6 100644 --- a/Runtime/ImGuiConsole.cpp +++ b/Runtime/ImGuiConsole.cpp @@ -15,7 +15,10 @@ namespace metaforce { std::array ImGuiConsole::entities; std::set ImGuiConsole::inspectingEntities; -void ImGuiStringViewText(std::string_view text) { ImGui::TextUnformatted(text.begin(), text.end()); } +void ImGuiStringViewText(std::string_view text) { + // begin()/end() do not work on MSVC + ImGui::TextUnformatted(text.data(), text.data() + text.size()); +} void ImGuiTextCenter(std::string_view text) { ImGui::NewLine();