From 54402ab47dab7fa54c0e7f157f400832bf0faea5 Mon Sep 17 00:00:00 2001 From: Desour Date: Wed, 16 Oct 2024 17:50:30 +0200 Subject: [PATCH] move translate_string definition back to cpp file, to not include translations.h in strings.h --- src/util/string.cpp | 5 +++++ src/util/string.h | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/util/string.cpp b/src/util/string.cpp index a9533195c382b..32355b6e76d33 100644 --- a/src/util/string.cpp +++ b/src/util/string.cpp @@ -932,6 +932,11 @@ std::wstring translate_string(std::wstring_view s, Translations *translations) return res; } +std::wstring translate_string(std::wstring_view s) +{ + return translate_string(s, g_client_translations); +} + static const std::array disallowed_dir_names = { // Problematic filenames from here: // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#file-and-directory-names diff --git a/src/util/string.h b/src/util/string.h index 238c7cb543562..06fcf975b5689 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #if IS_CLIENT_BUILD #include "irrString.h" #endif -#include "translation.h" #include #include #include @@ -657,10 +656,7 @@ std::vector > split(const std::basic_string &s, T delim) std::wstring translate_string(std::wstring_view s, Translations *translations); -inline std::wstring translate_string(std::wstring_view s) -{ - return translate_string(s, g_client_translations); -} +std::wstring translate_string(std::wstring_view s); inline std::wstring unescape_translate(std::wstring_view s) {