mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-09 03:57:51 +03:00
Merge branch 'moar_noboost' into 'master'
Remove even more of boost::filesystem See merge request OpenMW/openmw!1927
This commit is contained in:
commit
29328867dc
9 changed files with 39 additions and 39 deletions
|
@ -1,8 +1,8 @@
|
|||
#include "importer.hpp"
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
||||
#include <osgDB/ReadFile>
|
||||
#include <osg/ImageUtils>
|
||||
|
@ -345,7 +345,7 @@ namespace ESSImport
|
|||
|
||||
writer.setFormat (ESM::SavedGame::sCurrentFormat);
|
||||
|
||||
boost::filesystem::ofstream stream(boost::filesystem::path(mOutFile), std::ios::out | std::ios::binary);
|
||||
std::ofstream stream(std::filesystem::path(mOutFile), std::ios::out | std::ios::binary);
|
||||
// all unused
|
||||
writer.setVersion(0);
|
||||
writer.setType(0);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <iomanip>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <filesystem>
|
||||
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
|
||||
|
@ -684,7 +685,7 @@ void OMW::Engine::createWindow()
|
|||
|
||||
void OMW::Engine::setWindowIcon()
|
||||
{
|
||||
boost::filesystem::ifstream windowIconStream;
|
||||
std::ifstream windowIconStream;
|
||||
std::string windowIcon = (mResDir / "mygui" / "openmw.png").string();
|
||||
windowIconStream.open(windowIcon, std::ios_base::in | std::ios_base::binary);
|
||||
if (windowIconStream.fail())
|
||||
|
@ -759,13 +760,13 @@ void OMW::Engine::prepareEngine()
|
|||
// showing a loading screen and keeping the window responsive while doing so
|
||||
|
||||
std::string keybinderUser = (mCfgMgr.getUserConfigPath() / "input_v3.xml").string();
|
||||
bool keybinderUserExists = boost::filesystem::exists(keybinderUser);
|
||||
bool keybinderUserExists = std::filesystem::exists(keybinderUser);
|
||||
if(!keybinderUserExists)
|
||||
{
|
||||
std::string input2 = (mCfgMgr.getUserConfigPath() / "input_v2.xml").string();
|
||||
if(boost::filesystem::exists(input2)) {
|
||||
boost::filesystem::copy_file(input2, keybinderUser);
|
||||
keybinderUserExists = boost::filesystem::exists(keybinderUser);
|
||||
if(std::filesystem::exists(input2)) {
|
||||
std::filesystem::copy_file(input2, keybinderUser);
|
||||
keybinderUserExists = std::filesystem::exists(keybinderUser);
|
||||
Log(Debug::Info) << "Loading keybindings file: " << keybinderUser;
|
||||
}
|
||||
}
|
||||
|
@ -777,13 +778,13 @@ void OMW::Engine::prepareEngine()
|
|||
const std::string globaldefault = mCfgMgr.getGlobalPath().string() + "/gamecontrollerdb.txt";
|
||||
|
||||
std::string userGameControllerdb;
|
||||
if (boost::filesystem::exists(userdefault))
|
||||
if (std::filesystem::exists(userdefault))
|
||||
userGameControllerdb = userdefault;
|
||||
|
||||
std::string gameControllerdb;
|
||||
if (boost::filesystem::exists(localdefault))
|
||||
if (std::filesystem::exists(localdefault))
|
||||
gameControllerdb = localdefault;
|
||||
else if (boost::filesystem::exists(globaldefault))
|
||||
else if (std::filesystem::exists(globaldefault))
|
||||
gameControllerdb = globaldefault;
|
||||
//else if it doesn't exist, pass in an empty string
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <fstream>
|
||||
|
||||
#include <osgUtil/IncrementalCompileOperation>
|
||||
#include <osgUtil/CullVisitor>
|
||||
|
@ -242,8 +241,7 @@ private:
|
|||
|
||||
osg::ref_ptr<osg::Image> readPngImage (const std::string& file)
|
||||
{
|
||||
// use boost in favor of osgDB::readImage, to handle utf-8 path issues on Windows
|
||||
boost::filesystem::ifstream inStream;
|
||||
std::ifstream inStream;
|
||||
inStream.open(file, std::ios_base::in | std::ios_base::binary);
|
||||
if (inStream.fail())
|
||||
Log(Debug::Error) << "Error: Failed to open " << file;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue