mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45: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:
@@ -48,14 +48,6 @@ inline const wchar_t *wgettext(const char *str)
|
||||
return utf8_to_wide_c(gettext(str));
|
||||
}
|
||||
|
||||
inline std::wstring wstrgettext(const std::string &text)
|
||||
{
|
||||
const wchar_t *tmp = wgettext(text.c_str());
|
||||
std::wstring retval = (std::wstring)tmp;
|
||||
delete[] tmp;
|
||||
return retval;
|
||||
}
|
||||
|
||||
inline std::string strgettext(const std::string &text)
|
||||
{
|
||||
return gettext(text.c_str());
|
||||
|
Reference in New Issue
Block a user