Skip to content

Commit 40bda45

Browse files
committed
Fix bug where multiple propertysets were sharing the same properties
1 parent 6f6560c commit 40bda45

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/common/PropertySet.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,13 @@ class PropertySet {
9999
}
100100

101101
void append(const PropertySet& other) {
102-
for (auto& entry : other.properties) {
103-
properties.insert_or_assign(entry.first, entry.second);
102+
for (auto& [key, value] : other.properties) {
103+
auto it = properties.find(key);
104+
if (it == properties.end()) {
105+
properties.insert({key, std::make_shared<Value>(*value)});
106+
} else {
107+
*it->second = *value;
108+
}
104109
}
105110
}
106111

0 commit comments

Comments
 (0)