fixed some more stuff
This commit is contained in:
parent
3cf13c45bc
commit
164a68c5ee
4 changed files with 36 additions and 32 deletions
|
@ -1,6 +1,12 @@
|
|||
#include "config.h"
|
||||
|
||||
fn Config::getInstance() -> const Config& {
|
||||
static const Config* INSTANCE = new Config(rfl::toml::load<Config>("./config.toml").value());
|
||||
fn Config::getInstance()->const Config& {
|
||||
#ifdef __WIN32__
|
||||
const string path = string(getenv("LOCALAPPDATA")) + "\\draconis++\\config.toml";
|
||||
#else
|
||||
const string path = string(getenv("HOME")) + "/.config/draconis++/config.toml";
|
||||
#endif
|
||||
// ReSharper disable once CppDFAMemoryLeak
|
||||
static const Config* INSTANCE = new Config(rfl::toml::load<Config>(path).value());
|
||||
return *INSTANCE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue