From 272ba56fa14ee322771e81f41789be6f2a16edae Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Sat, 30 Aug 2025 18:24:17 -0300 Subject: [PATCH] remove unused function --- Utils/Text Utils.cpp | 11 ----------- i18n/include/Text.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/Utils/Text Utils.cpp b/Utils/Text Utils.cpp index 5ae5ac51..154ef003 100644 --- a/Utils/Text Utils.cpp +++ b/Utils/Text Utils.cpp @@ -388,17 +388,6 @@ void ParseCommandLine ( ++*numargs; } -inline std::string narrow(std::wstring const& text) -{ - std::locale const loc(""); - wchar_t const* from = text.c_str(); - std::size_t const len = text.size(); - std::vector buffer(len + 1); - std::use_facet >(loc).narrow(from, from + len, '_', &buffer[0]); - - return std::string(&buffer[0], &buffer[len]); -} - // convert UTF-8 string to wstring std::wstring utf8_to_wstring(const std::string& str) { diff --git a/i18n/include/Text.h b/i18n/include/Text.h index d9bb16b0..1e14d125 100644 --- a/i18n/include/Text.h +++ b/i18n/include/Text.h @@ -1803,8 +1803,6 @@ BOOLEAN LoadItemProsAndCons( UINT16 usIndex, STR16 pProsString, STR16 pConsStrin BOOLEAN LoadBRDesc(UINT16 ubIndex, STR16 pDescString ); BOOLEAN LoadBRName(UINT16 ubIndex, STR16 pNameString ); -// sevenfm -inline std::string narrow(std::wstring const& text); // convert UTF-8 string to wstring std::wstring utf8_to_wstring(const std::string& str); // convert wstring to UTF-8 string