From 0dc52a4d4329b2b9c28779860b84d2b8630e3c06 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Sat, 19 Jul 2025 12:06:23 +0200 Subject: [PATCH] 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 --- source/graphics/TextureManager.cpp | 4 ++-- source/ps/Filesystem.cpp | 11 ----------- source/ps/Filesystem.h | 7 ------- source/simulation2/components/ICmpAIManager.cpp | 2 +- 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/source/graphics/TextureManager.cpp b/source/graphics/TextureManager.cpp index 389eebc04b..e893fdb775 100644 --- a/source/graphics/TextureManager.cpp +++ b/source/graphics/TextureManager.cpp @@ -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); } /** diff --git a/source/ps/Filesystem.cpp b/source/ps/Filesystem.cpp index 5352a3aea2..83786ce24c 100644 --- a/source/ps/Filesystem.cpp +++ b/source/ps/Filesystem.cpp @@ -25,8 +25,6 @@ #include "ps/CStr.h" #include "ps/Profile.h" -#include - PIVFS g_VFS; static std::vector > 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) diff --git a/source/ps/Filesystem.h b/source/ps/Filesystem.h index 6938b12de6..44d2fa6abd 100644 --- a/source/ps/Filesystem.h +++ b/source/ps/Filesystem.h @@ -24,8 +24,6 @@ #include "ps/CStrForward.h" #include "ps/Errors.h" -#include - 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); diff --git a/source/simulation2/components/ICmpAIManager.cpp b/source/simulation2/components/ICmpAIManager.cpp index c39314fffe..1098bacc24 100644 --- a/source/simulation2/components/ICmpAIManager.cpp +++ b/source/simulation2/components/ICmpAIManager.cpp @@ -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);