1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00: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:
est31 2015-10-18 02:29:06 +02:00
parent f3d82567c9
commit 6b0cae5a9d
3 changed files with 34 additions and 42 deletions

View file

@ -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());