From c59192beb6c6a57cebad3a068979761cf96e2bcf 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();