Cleaned up property fetching
This commit is contained in:
1 parent
4b99a0bf33
commit
b8bd4a678a
2 files changed
+3
-2
No files matched your search
@@ -396,11 +396,12 @@ optional<Pin> ComdelGenerator::loadPin(PinNode node)
|
||||
}
|
||||
|
||||
int getIntProperty(DisplayItemNode &node, std::string property) {
|
||||
for(auto prop: node.values) {
|
||||
for(auto& prop: node.values) {
|
||||
if(prop.key.value == property) {
|
||||
return prop.value.asInt();
|
||||
}
|
||||
}
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
std::optional<Display> ComdelGenerator::loadDisplay(DisplayNode node)
|
||||
|
||||
Reference in new issue
Block a user