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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user