fix content inheritance issues

This commit is contained in:
MihailRis 2026-11-03 18:46:50 +03:00
parent 8124b550df
commit c9cc301e46
10 changed files with 55 additions and 22 deletions

View file

@ -38,16 +38,21 @@ public:
T& create(const std::string& id, bool* created = nullptr) {
auto found = defs.find(id);
if (found != defs.end()) {
if (created) *created = false;
if (created) {
*created = false;
}
return *found->second;
}
if (created) *created = true;
if (created) {
*created = true;
}
checkIdentifier(id);
allNames[id] = type;
names.push_back(id);
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);