forked from mia/Aegisub
Add utilities to a util:: namespace for clarity.
Originally committed to SVN as r5148.
This commit is contained in:
parent
68aa077add
commit
8f401a838a
4 changed files with 13 additions and 2 deletions
|
@ -32,7 +32,7 @@
|
|||
|
||||
Aegisub::Aegisub() {
|
||||
std::string default_config("{}");
|
||||
opt = new agi::Options(config_path() + "config.json", default_config, agi::Options::FLUSH_SKIP);
|
||||
opt = new agi::Options(util::config_path() + "config.json", default_config, agi::Options::FLUSH_SKIP);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
/// @brief Init the reporter.
|
||||
bool Reporter::OnInit() {
|
||||
|
||||
const std::string path_log(config_path() + "log/");
|
||||
const std::string path_log(util::config_path() + "log/");
|
||||
wxFileName::Mkdir(path_log, 0777, wxPATH_MKDIR_FULL);
|
||||
agi::log::log = new agi::log::LogSink(path_log);
|
||||
// if ( !wxApp::OnInit() )
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include "../acconf.h"
|
||||
|
||||
|
||||
namespace util {
|
||||
|
||||
std::string config_path() {
|
||||
wxStandardPathsBase &paths = wxStandardPaths::Get();
|
||||
|
||||
|
@ -39,3 +41,6 @@ std::string config_path() {
|
|||
return std::string(wxString::Format("%s/Aegisub/", paths.GetUserConfigDir()));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
} // namespace util
|
||||
|
|
|
@ -19,6 +19,12 @@
|
|||
/// @ingroup base
|
||||
|
||||
|
||||
/// Utilities.
|
||||
namespace util {
|
||||
|
||||
/// Return config path.
|
||||
/// @return Config path.
|
||||
std::string config_path();
|
||||
|
||||
|
||||
} // namespace util
|
||||
|
|
Loading…
Reference in a new issue