Skip to content

Commit

Permalink
Fixed YAML parser/serializer to handle unsigned ints again. Fixes #140.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmatuschek committed Oct 2, 2021
1 parent a8af6c4 commit 780b079
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/configobject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ ConfigObject::populate(YAML::Node &node, const Context &context){
node[prop.name()] = this->property(prop.name()).toBool();
} else if (QString("int") == prop.typeName()) {
node[prop.name()] = this->property(prop.name()).toInt();
} else if (QString("unsigned") == prop.typeName()) {
} else if (QString("uint") == prop.typeName()) {
node[prop.name()] = this->property(prop.name()).toUInt();
} else if (QString("double") == prop.typeName()) {
node[prop.name()] = this->property(prop.name()).toDouble();
Expand Down
2 changes: 1 addition & 1 deletion lib/configreader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ AbstractConfigReader::parse(ConfigObject *obj, const YAML::Node &node, ConfigObj
return false;
}
prop.write(obj, node[prop.name()].as<int>());
} else if (QString("unsigned") == prop.typeName()) {
} else if (QString("uint") == prop.typeName()) {
// If property is not set -> skip
if (! node[prop.name()])
continue;
Expand Down

0 comments on commit 780b079

Please sign in to comment.