1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

extract functions of string <-> boost::filesystem::path to TextOperations.h

This commit is contained in:
kdmcser
2025-04-20 00:23:41 +08:00
parent 8d25748dba
commit c3c8b5048a
4 changed files with 29 additions and 20 deletions

View File

@@ -27,8 +27,6 @@
#include "../IGameSettings.h"
#include "../CConfigHandler.h"
#include <boost/locale/encoding_utf.hpp>
VCMI_LIB_NAMESPACE_BEGIN
CMapInfo::CMapInfo()
@@ -45,11 +43,7 @@ CMapInfo::~CMapInfo()
std::string CMapInfo::getFullFileURI(const ResourcePath & file) const
{
auto path = boost::filesystem::canonical(*CResourceHandler::get()->getResourceName(file));
#ifdef VCMI_WINDOWS
return boost::locale::conv::utf_to_utf<char>(path.native());
#else
return path.string();
#endif
return TextOperations::filesystemPathToUtf8(path);
}
void CMapInfo::mapInit(const std::string & fname)