summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-0/memorystore.cpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-26 12:25:58 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-26 12:25:58 -0800
commitcae16e6c034808199f12a37ec0bdb4822c988dca (patch)
treed2ec4daa9650e4e58d159bc3ef172d05947b2db2 /starts/meaning-vm/level-0/memorystore.cpp
parent0a9e019f082578895e4ebc88e4b89188da17947f (diff)
downloadstandingwithresilience-cae16e6c034808199f12a37ec0bdb4822c988dca.tar.gz
standingwithresilience-cae16e6c034808199f12a37ec0bdb4822c988dca.zip
switch data to use std::any and merge value struct with concept
Diffstat (limited to 'starts/meaning-vm/level-0/memorystore.cpp')
-rw-r--r--starts/meaning-vm/level-0/memorystore.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/starts/meaning-vm/level-0/memorystore.cpp b/starts/meaning-vm/level-0/memorystore.cpp
index b092ca0..adae8b2 100644
--- a/starts/meaning-vm/level-0/memorystore.cpp
+++ b/starts/meaning-vm/level-0/memorystore.cpp
@@ -14,8 +14,9 @@ static auto & concepts()
return concepts;
}
-ref alloc(concept * moved) {
- ref r = moved ? moved : new concept();
+ref alloc(std::any data) {
+ concept * r = new concept();
+ r->data = data;
concepts().insert(r);
return r;
}