Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions.

This commit is contained in:
Project579 2022-07-03 00:02:29 +02:00
parent 4d47e8d055
commit a13709c510
88 changed files with 394 additions and 328 deletions

View file

@ -2,6 +2,7 @@
#include <array>
#include <string>
#include <utility>
#include <osg/Texture1D>
#include <osg/Texture2D>
@ -16,6 +17,7 @@
#include <components/sceneutil/util.hpp>
#include <components/resource/imagemanager.hpp>
#include <components/debug/debuglog.hpp>
#include <components/files/conversion.hpp>
#include "parse_constants.hpp"
@ -37,9 +39,9 @@ namespace
namespace fx
{
Technique::Technique(const VFS::Manager& vfs, Resource::ImageManager& imageManager, const std::string& name, int width, int height, bool ubo, bool supportsNormals)
: mName(name)
, mFileName((std::filesystem::path(Technique::sSubdir) / (mName + Technique::sExt)).string()) //TODO(Project579): let's hope unicode characters are never used in these filenames on windows or this will break
Technique::Technique(const VFS::Manager& vfs, Resource::ImageManager& imageManager, std::string name, int width, int height, bool ubo, bool supportsNormals)
: mName(std::move(name))
, mFileName(Files::pathToUnicodeString((Files::pathFromUnicodeString(Technique::sSubdir) / (mName + Technique::sExt))))
, mLastModificationTime(std::filesystem::file_time_type())
, mWidth(width)
, mHeight(height)