From 56cf08a873fb889c2855d0b4dcea9939f54a8787 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Fri, 13 May 2011 15:24:21 +0000 Subject: [PATCH] made "filestorage << vector" work properly. --- modules/core/include/opencv2/core/core.hpp | 3 +-- modules/core/include/opencv2/core/operations.hpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/core/include/opencv2/core/core.hpp b/modules/core/include/opencv2/core/core.hpp index 7bf76e1ed6..3065b2fbff 100644 --- a/modules/core/include/opencv2/core/core.hpp +++ b/modules/core/include/opencv2/core/core.hpp @@ -978,8 +978,7 @@ public: typedef value_type channel_type; typedef value_type vec_type; - enum { generic_type = 1, depth = DataDepth::value, channels = 1, - fmt=DataDepth::fmt, + enum { generic_type = 1, depth = -1, channels = 1, fmt=0, type = CV_MAKETYPE(depth, channels) }; }; diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp index 5ab8c88195..0d12d5ecee 100644 --- a/modules/core/include/opencv2/core/operations.hpp +++ b/modules/core/include/opencv2/core/operations.hpp @@ -2638,7 +2638,7 @@ template static inline void write( FileStorage& fs, const vector<_ template static inline FileStorage& operator << ( FileStorage& fs, const vector<_Tp>& vec ) { - VecWriterProxy<_Tp, DataType<_Tp>::fmt != 0> w(&fs); + VecWriterProxy<_Tp, DataType<_Tp>::generic_type == 0> w(&fs); w(vec); return fs; }