Remove some more of boost::

fix/shrink_builds
jvoisin 3 years ago
parent 29328867dc
commit cb226e00f9

@ -1,5 +1,7 @@
#include "statemanagerimp.hpp"
#include <filesystem>
#include <components/debug/debuglog.hpp>
#include <components/esm3/esmwriter.hpp>
@ -388,7 +390,7 @@ void MWState::StateManager::loadGame (const Character *character, const std::str
{
cleanup();
Log(Debug::Info) << "Reading save file " << boost::filesystem::path(filepath).filename().string();
Log(Debug::Info) << "Reading save file " << std::filesystem::path(filepath).filename().string();
ESM::ESMReader reader;
reader.open (filepath);

@ -1,6 +1,7 @@
#include <gtest/gtest.h>
#include <boost/filesystem/fstream.hpp>
#include <fstream>
#include <filesystem>
#include <components/files/configurationmanager.hpp>
#include <components/esm3/esmreader.hpp>
@ -110,7 +111,7 @@ TEST_F(ContentFileTest, dialogue_merging_test)
const std::string file = "test_dialogue_merging.txt";
boost::filesystem::ofstream stream;
std::ofstream stream;
stream.open(file);
const MWWorld::Store<ESM::Dialogue>& dialStore = mEsmStore.get<ESM::Dialogue>();
@ -192,7 +193,7 @@ TEST_F(ContentFileTest, content_diagnostics_test)
const std::string file = "test_content_diagnostics.txt";
boost::filesystem::ofstream stream;
std::ofstream stream;
stream.open(file);
RUN_TEST_FOR_TYPES(printRecords, mEsmStore, stream);

@ -1,6 +1,6 @@
#include <components/settings/parser.hpp>
#include <boost/filesystem/fstream.hpp>
#include <fstream>
#include <gtest/gtest.h>
@ -20,7 +20,7 @@ namespace
const auto path = std::string(UnitTest::GetInstance()->current_test_info()->name()) + ".cfg";
{
boost::filesystem::ofstream stream;
std::ofstream stream;
stream.open(path);
stream << content;
stream.close();

@ -1,6 +1,6 @@
#include <components/shader/shadermanager.hpp>
#include <boost/filesystem/fstream.hpp>
#include <fstream>
#include <gtest/gtest.h>
@ -31,7 +31,7 @@ namespace
const auto path = UnitTest::GetInstance()->current_test_info()->name() + suffix + ".glsl";
{
boost::filesystem::ofstream stream;
std::ofstream stream;
stream.open(path);
stream << content;
stream.close();

@ -1,6 +1,7 @@
#include "settings.hpp"
#include "parser.hpp"
#include <filesystem>
#include <sstream>
#include <components/files/configurationmanager.hpp>
@ -44,7 +45,7 @@ std::string Manager::load(const Files::ConfigurationManager& cfgMgr, bool loadEd
// Create the settings manager and load default settings file.
const std::string defaultsBin = (paths.front() / defaultSettingsFile).string();
if (!boost::filesystem::exists(defaultsBin))
if (!std::filesystem::exists(defaultsBin))
throw std::runtime_error ("No default settings file found! Make sure the file \"" + defaultSettingsFile + "\" was properly installed.");
parser.loadSettingsFile(defaultsBin, mDefaultSettings, true, false);
@ -52,13 +53,13 @@ std::string Manager::load(const Files::ConfigurationManager& cfgMgr, bool loadEd
for (int i = 0; i < static_cast<int>(paths.size()) - 1; ++i)
{
const std::string additionalDefaults = (paths[i] / userSettingsFile).string();
if (boost::filesystem::exists(additionalDefaults))
if (std::filesystem::exists(additionalDefaults))
parser.loadSettingsFile(additionalDefaults, mDefaultSettings, false, true);
}
// Load "settings.cfg" or "openmw-cs.cfg" from the last config dir as user settings. This path will be used to save modified settings.
std::string settingspath = (paths.back() / userSettingsFile).string();
if (boost::filesystem::exists(settingspath))
if (std::filesystem::exists(settingspath))
parser.loadSettingsFile(settingspath, mUserSettings, false, false);
return settingspath;

@ -1,6 +1,6 @@
#include "translation.hpp"
#include <boost/filesystem/fstream.hpp>
#include <fstream>
namespace Translation
{
@ -32,8 +32,8 @@ namespace Translation
if (dataFileCollections.getCollection (extension).doesExist (fileName))
{
boost::filesystem::ifstream stream (
dataFileCollections.getCollection (extension).getPath (fileName));
std::ifstream stream (
dataFileCollections.getCollection (extension).getPath (fileName).c_str());
if (!stream.is_open())
throw std::runtime_error ("failed to open translation file: " + fileName);

Loading…
Cancel
Save