summaryrefslogtreecommitdiff
path: root/assetFactory/use.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-03-02 18:36:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-03-02 18:36:34 +0000
commit17ac090dd1dd245cf1e24b62b7333ba9be571bde (patch)
tree488bb1dae6478dd72cc3cb8a433cbac736f9c387 /assetFactory/use.cpp
parentParse colour values as they're read (diff)
downloadilt-17ac090dd1dd245cf1e24b62b7333ba9be571bde.tar.bz2
ilt-17ac090dd1dd245cf1e24b62b7333ba9be571bde.tar.xz
ilt-17ac090dd1dd245cf1e24b62b7333ba9be571bde.zip
Add ParseBase
Acts as a base class for persistence parser, encompasses the parse stack and manages shared objects
Diffstat (limited to 'assetFactory/use.cpp')
-rw-r--r--assetFactory/use.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/assetFactory/use.cpp b/assetFactory/use.cpp
index 53fc9b9..708e310 100644
--- a/assetFactory/use.cpp
+++ b/assetFactory/use.cpp
@@ -18,8 +18,7 @@ struct Lookup : public Persistence::SelectionV<Shape::CPtr> {
void
setValue(std::string && str) override
{
- if (auto mf = std::dynamic_pointer_cast<const AssetFactory>(
- Persistence::sharedObjects.at("assetFactory"))) {
+ if (auto mf = Persistence::ParseBase::getShared<const AssetFactory>("assetFactory")) {
v = mf->shapes.at(str);
}
}