libcamera: yaml_parser: Extend YamlObject::size() to dictionaries

Dictionaries have a size too, extend the size() function to support
them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2022-06-16 02:43:47 +03:00
parent 27483e971f
commit 27fb47f70b
3 changed files with 30 additions and 20 deletions
+5
View File
@@ -421,6 +421,11 @@ protected:
return TestFail;
}
if (dictObj.size() != 3) {
cerr << "Dictionary object parse with wrong size" << std::endl;
return TestFail;
}
auto memeberNames = dictObj.memberNames();
sort(memeberNames.begin(), memeberNames.end());