mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 06:43:01 +04:00
Add a test for FileNode::keys()
This commit is contained in:
@@ -271,14 +271,13 @@ FileNode FileNode::operator[](int i) const
|
||||
|
||||
std::vector<String> FileNode::keys() const
|
||||
{
|
||||
CV_Assert(isMap());
|
||||
|
||||
std::vector<String> res;
|
||||
if (isMap())
|
||||
res.reserve(size());
|
||||
for (FileNodeIterator it = begin(); it != end(); ++it)
|
||||
{
|
||||
res.reserve(size());
|
||||
for (FileNodeIterator it = begin(); it != end(); ++it)
|
||||
{
|
||||
res.push_back((*it).name());
|
||||
}
|
||||
res.push_back((*it).name());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user