diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-18 15:34:22 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-18 15:34:22 +0100 |
commit | b92da3c729c8fc7c002cb3acbb75c56cb63bd89e (patch) | |
tree | 454b64d31b7e0c9151da88a0d49ee782565f49e9 /src/example/savemgr.cpp | |
parent | 8b449e764b5c91cd3cb0c4fa404a290ab295a7ef (diff) | |
parent | 121b64b1cb6cfead5814070c8b0185d3d7308095 (diff) |
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/events
Diffstat (limited to 'src/example/savemgr.cpp')
-rw-r--r-- | src/example/savemgr.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/example/savemgr.cpp b/src/example/savemgr.cpp index 436fb5a..65c4a34 100644 --- a/src/example/savemgr.cpp +++ b/src/example/savemgr.cpp @@ -6,8 +6,8 @@ #include <cassert> #include <crepe/api/Config.h> #include <crepe/api/SaveManager.h> +#include <crepe/util/Log.h> #include <crepe/util/Proxy.h> -#include <crepe/util/log.h> using namespace crepe; @@ -15,7 +15,7 @@ using namespace crepe; int _ = []() { // make sure all log messages get printed auto & cfg = Config::get_instance(); - cfg.log.level = LogLevel::TRACE; + cfg.log.level = Log::Level::TRACE; return 0; // satisfy compiler }(); @@ -25,19 +25,19 @@ int main() { SaveManager & mgr = SaveManager::get_instance(); - dbg_logf("has key = %s", mgr.has(key) ? "true" : "false"); + dbg_logf("has key = {}", mgr.has(key)); ValueBroker<int> prop = mgr.get<int>(key, 0); Proxy<int> val = mgr.get<int>(key, 0); - dbg_logf("val = %d", mgr.get<int>(key).get()); + dbg_logf("val = {}", mgr.get<int>(key).get()); prop.set(1); - dbg_logf("val = %d", mgr.get<int>(key).get()); + dbg_logf("val = {}", mgr.get<int>(key).get()); val = 2; - dbg_logf("val = %d", mgr.get<int>(key).get()); + dbg_logf("val = {}", mgr.get<int>(key).get()); mgr.set<int>(key, 3); - dbg_logf("val = %d", mgr.get<int>(key).get()); + dbg_logf("val = {}", mgr.get<int>(key).get()); - dbg_logf("has key = %s", mgr.has(key) ? "true" : "false"); + dbg_logf("has key = {}", mgr.has(key)); assert(true == mgr.has(key)); return 0; |