More fixes 3

This commit is contained in:
Ryzerth 2020-09-24 19:50:22 +02:00
parent 2056eae139
commit 5fedda08d7
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ void ConfigManager::setPath(std::string file) {
path = file;
}
void ConfigManager::load(json default, bool lock) {
void ConfigManager::load(json def, bool lock) {
if (lock) { mtx.lock(); }
if (path == "") {
spdlog::error("Config manager tried to load file with no path specified");
@ -16,7 +16,7 @@ void ConfigManager::load(json default, bool lock) {
}
if (!std::filesystem::exists(path)) {
spdlog::warn("Config file '{0}' does not exist, creating it", path);
conf = default;
conf = def;
save(false);
}
if (!std::filesystem::is_regular_file(path)) {

View File

@ -27,7 +27,7 @@ class ConfigManager {
public:
ConfigManager();
void setPath(std::string file);
void load(json default, bool lock = true);
void load(json def, bool lock = true);
void save(bool lock = true);
void enableAutoSave();
void disableAutoSave();