Cleaned up property fetching

This commit is contained in:
Borna Rajkovic 2022-04-08 18:55:29 +02:00
parent 4b99a0bf33
commit b8bd4a678a
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 6.0.2, 2022-04-05T08:22:13. -->
<!-- Written by QtCreator 6.0.2, 2022-04-08T00:30:41. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@ -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)