mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Remove wstrgettext
Everywhere where wstrgettext was used, its output was converted back to utf8. As wstrgettext internally converts the return value from utf8 to wstring, it has been a waste. Remove the function, and use strgettext instead.
This commit is contained in:
@@ -1059,8 +1059,8 @@ int ModApiMainMenu::l_get_video_modes(lua_State *L)
|
||||
/******************************************************************************/
|
||||
int ModApiMainMenu::l_gettext(lua_State *L)
|
||||
{
|
||||
std::wstring wtext = wstrgettext((std::string) luaL_checkstring(L, 1));
|
||||
lua_pushstring(L, wide_to_utf8(wtext).c_str());
|
||||
std::string text = strgettext(std::string(luaL_checkstring(L, 1)));
|
||||
lua_pushstring(L, text.c_str());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user