Drop GetWstringFromWpath helper function

657be906fe allowed the use of boost filesystem v4, so this should have
been updated as well. As boost filesystem v2 is irrelevant as it was
removed in boost-1.50 so just remove the wrapper function altogether.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser 2025-07-19 12:06:23 +02:00
parent 0d60ecbf96
commit 0dc52a4d43
No known key found for this signature in database
4 changed files with 3 additions and 21 deletions

View file

@ -803,9 +803,9 @@ public:
CTextureConverter::SettingsFile* f = GetSettingsFile(settingsPath);
if (f)
files.push_back(f);
p = p / GetWstringFromWpath(*it);
p = p / it->wstring();
}
return m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.filename()), files);
return m_TextureConverter.ComputeSettings(srcPath.filename().wstring(), files);
}
/**

View file

@ -25,8 +25,6 @@
#include "ps/CStr.h"
#include "ps/Profile.h"
#include <boost/filesystem.hpp>
PIVFS g_VFS;
static std::vector<std::pair<FileReloadFunc, void*> > g_ReloadFuncs;
@ -101,15 +99,6 @@ Status ReloadChangedFiles()
return INFO::OK;
}
std::wstring GetWstringFromWpath(const boost::filesystem::path& path)
{
#if BOOST_FILESYSTEM_VERSION == 3
return path.wstring();
#else
return path.string();
#endif
}
CVFSFile::CVFSFile()
: m_BufferSize(0)

View file

@ -24,8 +24,6 @@
#include "ps/CStrForward.h"
#include "ps/Errors.h"
#include <boost/filesystem.hpp>
extern PIVFS g_VFS;
extern bool VfsFileExists(const VfsPath& pathname);
@ -56,11 +54,6 @@ void UnregisterFileReloadFunc(FileReloadFunc func, void* obj);
**/
extern Status ReloadChangedFiles();
/**
* Helper function to handle API differences between Boost Filesystem v2 and v3
*/
std::wstring GetWstringFromWpath(const boost::filesystem::path& path);
ERROR_GROUP(CVFSFile);
ERROR_TYPE(CVFSFile, LoadFailed);
ERROR_TYPE(CVFSFile, AlreadyLoaded);

View file

@ -63,7 +63,7 @@ public:
boost::filesystem::path components = pathname.string();
boost::filesystem::path::iterator it = components.begin();
std::advance(it, 2);
std::wstring dirname = GetWstringFromWpath(*it);
std::wstring dirname = it->wstring();
JS::RootedValue ai(rq.cx);
Script::CreateObject(rq, &ai);