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

add std::string overload for cv::read()

This commit is contained in:
PkLab.net
2017-05-26 19:14:58 +02:00
committed by Vladislav Sovrasov
parent 5b833db558
commit 6dd9e18b2e
3 changed files with 7 additions and 3 deletions
+5
View File
@@ -7396,6 +7396,11 @@ void read(const FileNode& node, String& value, const String& default_value)
value = !node.node ? default_value : CV_NODE_IS_STRING(node.node->tag) ? String(node.node->data.str.ptr) : String();
}
void read(const FileNode& node, std::string& value, const std::string& default_value)
{
value = !node.node ? default_value : CV_NODE_IS_STRING(node.node->tag) ? std::string(node.node->data.str.ptr) : default_value;
}
}