From: ohnozzy Date: Sat, 9 Apr 2016 11:01:34 +0000 (+0800) Subject: Bug Fix for Issue 6288 X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1914^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dd962ca1abf8b784141806ef02d5a82a8ea44a9;p=platform%2Fupstream%2Fopencv.git Bug Fix for Issue 6288 Added 2 inline functions in persistence.hpp So that the '>>' operator works correctly for std::Vector and std::Vector --- diff --git a/modules/core/include/opencv2/core/persistence.hpp b/modules/core/include/opencv2/core/persistence.hpp index 17686dd..9cf3bca 100644 --- a/modules/core/include/opencv2/core/persistence.hpp +++ b/modules/core/include/opencv2/core/persistence.hpp @@ -1130,6 +1130,23 @@ void operator >> (const FileNode& n, std::vector<_Tp>& vec) it >> vec; } +/** @brief Reads KeyPoint from a file storage. +*/ +//It needs special handling because it contains two types of fields, int & float. +static inline +void operator >> (const FileNode& n, std::vector& vec) +{ + read(n, vec); +} +/** @brief Reads DMatch from a file storage. +*/ +//It needs special handling because it contains two types of fields, int & float. +static inline +void operator >> (const FileNode& n, std::vector& vec) +{ + read(n, vec); +} + //! @} FileNode //! @relates cv::FileNodeIterator