aboutsummaryrefslogtreecommitdiff
path: root/src/example/savemgr.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-13 15:40:01 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-13 15:40:01 +0100
commit7ec392eda3345606f0de75a432954b221cee82ce (patch)
tree48689f986a3c4042ec6b7704dad053f25ef898bf /src/example/savemgr.cpp
parent202725f481e64c4d95e370102ab93d4f8cf4af93 (diff)
add doxygen + check const correctness
Diffstat (limited to 'src/example/savemgr.cpp')
-rw-r--r--src/example/savemgr.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/example/savemgr.cpp b/src/example/savemgr.cpp
index 436fb5a..5a415b7 100644
--- a/src/example/savemgr.cpp
+++ b/src/example/savemgr.cpp
@@ -7,7 +7,7 @@
#include <crepe/api/Config.h>
#include <crepe/api/SaveManager.h>
#include <crepe/util/Proxy.h>
-#include <crepe/util/log.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;