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-05-24 12:23:38 +03:00
parent 27483e971f
commit 27fb47f70b
3 changed files with 30 additions and 20 deletions

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());