From ae62cb75b472772edd646d817dbfac83012269a5 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 8 Jan 2012 01:35:49 +0000 Subject: [PATCH] Add missing uses of STD_STR when converting from wxString to std::string Originally committed to SVN as r6243. --- aegisub/src/main.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp index 2e28b7605..03777321f 100644 --- a/aegisub/src/main.cpp +++ b/aegisub/src/main.cpp @@ -142,9 +142,9 @@ bool AegisubApp::OnInit() { #endif // logging. - const std::string path_log(StandardPaths::DecodePath("?user/log/")); + wxString path_log = StandardPaths::DecodePath("?user/log/"); wxFileName::Mkdir(path_log, 0777, wxPATH_MKDIR_FULL); - agi::log::log = new agi::log::LogSink(path_log); + agi::log::log = new agi::log::LogSink(STD_STR(path_log)); #ifdef _DEBUG @@ -168,8 +168,7 @@ bool AegisubApp::OnInit() { // Set config file StartupLog("Load configuration"); try { - const std::string conf_user(StandardPaths::DecodePath("?user/config.json")); - config::opt = new agi::Options(conf_user, GET_DEFAULT_CONFIG(default_config)); + config::opt = new agi::Options(STD_STR(StandardPaths::DecodePath("?user/config.json")), GET_DEFAULT_CONFIG(default_config)); } catch (agi::Exception& e) { LOG_E("config/init") << "Caught exception: " << e.GetName() << " -> " << e.GetMessage(); } @@ -177,7 +176,7 @@ bool AegisubApp::OnInit() { #ifdef __WXMSW__ // Try loading configuration from the install dir if one exists there try { - const std::string conf_local(StandardPaths::DecodePath("?data/config.json")); + std::string conf_local(STD_STR(StandardPaths::DecodePath("?data/config.json"))); agi::scoped_ptr localConfig(agi::io::Open(conf_local)); config::opt->ConfigNext(*localConfig); @@ -200,8 +199,7 @@ bool AegisubApp::OnInit() { } StartupLog("Load MRU"); - const std::string conf_mru(StandardPaths::DecodePath("?user/mru.json")); - config::mru = new agi::MRUManager(conf_mru, GET_DEFAULT_CONFIG(default_mru)); + config::mru = new agi::MRUManager(STD_STR(StandardPaths::DecodePath("?user/mru.json")), GET_DEFAULT_CONFIG(default_mru)); #ifdef __VISUALC__ SetThreadName((DWORD) -1,"AegiMain");