From 06b76612b28183f0a047dac3a4127120d2af1b39 Mon Sep 17 00:00:00 2001 From: hop311 Date: Wed, 31 Jul 2024 23:17:32 +0100 Subject: Use UTF8 encoding and simplify godot string conversion Fixes #180: Province names do not convert non-ascii characters to Unicode --- extension/src/openvic-extension/classes/GUIListBox.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'extension/src/openvic-extension/classes/GUIListBox.cpp') diff --git a/extension/src/openvic-extension/classes/GUIListBox.cpp b/extension/src/openvic-extension/classes/GUIListBox.cpp index e3bea86..9165b14 100644 --- a/extension/src/openvic-extension/classes/GUIListBox.cpp +++ b/extension/src/openvic-extension/classes/GUIListBox.cpp @@ -11,8 +11,6 @@ using namespace OpenVic; using namespace godot; using namespace OpenVic::Utilities::literals; -using OpenVic::Utilities::std_view_to_godot_string; - /* StringNames cannot be constructed until Godot has called StringName::setup(), * so we must use wrapper functions to delay their initialisation. */ StringName const& GUIListBox::_signal_scroll_index_changed() { @@ -252,7 +250,7 @@ Error GUIListBox::set_gui_listbox(GUI::ListBox const* new_gui_listbox) { gui_listbox = new_gui_listbox; - const String scrollbar_name = std_view_to_godot_string(gui_listbox->get_scrollbar_name()); + const String scrollbar_name = Utilities::std_to_godot_string(gui_listbox->get_scrollbar_name()); Error err = OK; @@ -300,7 +298,7 @@ Error GUIListBox::set_gui_listbox(GUI::ListBox const* new_gui_listbox) { } String GUIListBox::get_gui_listbox_name() const { - return gui_listbox != nullptr ? std_view_to_godot_string(gui_listbox->get_name()) : String {}; + return gui_listbox != nullptr ? Utilities::std_to_godot_string(gui_listbox->get_name()) : String {}; } GUIScrollbar* GUIListBox::get_scrollbar() const { -- cgit v1.2.3-56-ga3b1