diff options
Diffstat (limited to 'src/example/savemgr.cpp')
-rw-r--r-- | src/example/savemgr.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/example/savemgr.cpp b/src/example/savemgr.cpp index 810947d..5c034c4 100644 --- a/src/example/savemgr.cpp +++ b/src/example/savemgr.cpp @@ -5,6 +5,7 @@ #include <cassert> #include <crepe/util/log.h> +#include <crepe/util/Proxy.h> #include <crepe/api/SaveManager.h> using namespace crepe; @@ -15,9 +16,11 @@ int main() { const char * key = "mygame.test"; SaveManager & mgr = SaveManager::get_instance(); - auto & prop = mgr.get<unsigned int>(key, 1); - prop = 2; + ValueBroker<unsigned int> & prop = mgr.get<unsigned int>(key, 0); + Proxy<unsigned int> val = mgr.get<unsigned int>(key, 0); + prop.set(1); + val = 2; mgr.set<unsigned int>(key, 3); assert(true == mgr.has(key)); |