Update main.cpp

Switched file streams to those that can open non-ANSI file paths (the header file "streams.h" has not yet been committed).
This commit is contained in:
WrinklyNinja
2013-07-22 10:41:16 +01:00
parent a81e8571e7
commit 3d7972062f
+4 -3
View File
@@ -32,6 +32,7 @@
#include "../backend/helpers.h"
#include "../backend/generators.h"
#include "../backend/network.h"
#include "../backend/streams.h"
#include <ostream>
#include <algorithm>
@@ -376,7 +377,7 @@ void Launcher::OnClose(wxCloseEvent& event) {
yout.SetIndent(2);
yout << _settings;
ofstream out(boss::g_path_settings.string().c_str());
boss::ofstream out(boss::g_path_settings.string().c_str());
out << yout.c_str();
out.close();
@@ -652,7 +653,7 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) {
<< YAML::Key << "plugins" << YAML::Value << ulist_plugins
<< YAML::EndMap;
ofstream uout(_game.UserlistPath().string().c_str());
boss::ofstream uout(_game.UserlistPath().string().c_str());
uout << yout.c_str();
uout.close();
@@ -686,7 +687,7 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) {
if (fs::exists(_game.ReportPath().string())) {
BOOST_LOG_TRIVIAL(debug) << "Reading the previous report's details section.";
//Read the whole file in.
ifstream in(_game.ReportPath().string().c_str(), ios::binary);
boss::ifstream in(_game.ReportPath().string().c_str(), ios::binary);
in.seekg(0, std::ios::end);
oldDetails.resize(in.tellg());
in.seekg(0, std::ios::beg);