1
0
mirror of https://github.com/minetest/minetest.git synced 2025-06-30 23:20:22 +02:00

Drop wide/narrow conversion functions

The only valid usecase for these is interfacing with OS APIs
that want a locale/OS-specific multibyte encoding.
But they weren't used for that anywhere, instead UTF-8 is pretty
much assumed when it comes to that.
Since these are only a potential source of bugs and do not fulfil
their purpose at all, drop them entirely.
This commit is contained in:
sfan5
2021-01-29 14:03:27 +01:00
parent 5e392cf34f
commit c834d2ab25
11 changed files with 41 additions and 143 deletions

View File

@ -192,8 +192,7 @@ void GUIConfirmRegistration::acceptInput()
bool GUIConfirmRegistration::processInput()
{
std::wstring m_password_ws = narrow_to_wide(m_password);
if (m_password_ws != m_pass_confirm) {
if (utf8_to_wide(m_password) != m_pass_confirm) {
gui::IGUIElement *e = getElementFromId(ID_message);
if (e)
e->setVisible(true);