Fix ImGuiStringViewText on MSVC

This commit is contained in:
Luke Street 2021-05-27 12:57:50 -04:00
parent 7825b0cafb
commit 2ff5bc5c0f
1 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,10 @@ namespace metaforce {
std::array<ImGuiEntityEntry, 1024> ImGuiConsole::entities;
std::set<TUniqueId> 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();