1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Add FileNode::keys() missed during refactoring

This commit is contained in:
Dmitry Kurtaev
2018-11-12 13:29:38 +03:00
parent 5459c11e99
commit a7f30391d0
3 changed files with 24 additions and 0 deletions
+13
View File
@@ -2083,6 +2083,19 @@ FileNode FileNode::operator[](int i) const
return *it;
}
std::vector<String> FileNode::keys() const
{
CV_Assert(isMap());
std::vector<String> res;
res.reserve(size());
for (FileNodeIterator it = begin(); it != end(); ++it)
{
res.push_back((*it).name());
}
return res;
}
int FileNode::type() const
{
const uchar* p = ptr();