1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Avoid copies when working with EnrichedString

This commit is contained in:
sfan5
2024-08-27 13:51:02 +02:00
parent fa4529b4f1
commit 19a58745c9
6 changed files with 53 additions and 54 deletions

View File

@@ -631,11 +631,11 @@ std::vector<std::basic_string<T> > split(const std::basic_string<T> &s, T delim)
return tokens;
}
std::wstring translate_string(const std::wstring &s, Translations *translations);
std::wstring translate_string(std::wstring_view s, Translations *translations);
std::wstring translate_string(const std::wstring &s);
std::wstring translate_string(std::wstring_view s);
inline std::wstring unescape_translate(const std::wstring &s) {
inline std::wstring unescape_translate(std::wstring_view s) {
return unescape_enriched(translate_string(s));
}