Merge branch 'main' into heightmaps

This commit is contained in:
MihailRis
2024-08-23 00:01:57 +03:00
9 changed files with 256 additions and 34 deletions
+8
View File
@@ -45,6 +45,14 @@ public:
defs[id] = std::make_unique<T>(id);
return *defs[id];
}
// Only fetch existing definition, return null otherwise.
T* get(const std::string& id) {
auto found = defs.find(id);
if (found != defs.end()) {
return &*found->second;
}
return nullptr;
}
auto build() {
return std::move(defs);