From 6fea48c54f13583f8eb87560504b19e9c5310988 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Sat, 30 Mar 2013 21:50:20 +0400 Subject: [PATCH] Drop operator* from MatCommaInitializer --- modules/core/include/opencv2/core/mat.hpp | 1 - modules/core/include/opencv2/core/mat.inl.hpp | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index 1042a1d..3378e9d 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -231,7 +231,6 @@ public: //! the operator that takes the next value and put it to the matrix template MatCommaInitializer_<_Tp>& operator , (T2 v); //! another form of conversion operator - Mat_<_Tp> operator *() const; operator Mat_<_Tp>() const; protected: MatIterator_<_Tp> it; diff --git a/modules/core/include/opencv2/core/mat.inl.hpp b/modules/core/include/opencv2/core/mat.inl.hpp index 35be87c..f00bdca 100644 --- a/modules/core/include/opencv2/core/mat.inl.hpp +++ b/modules/core/include/opencv2/core/mat.inl.hpp @@ -379,7 +379,7 @@ Mat::Mat(const MatCommaInitializer_<_Tp>& commaInitializer) : flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(0), rows(0), cols(0), data(0), refcount(0), datastart(0), dataend(0), allocator(0), size(&rows) { - *this = *commaInitializer; + *this = commaInitializer.operator Mat_<_Tp>(); } inline @@ -2692,13 +2692,6 @@ MatCommaInitializer_<_Tp>& MatCommaInitializer_<_Tp>::operator , (T2 v) } template inline -Mat_<_Tp> MatCommaInitializer_<_Tp>::operator *() const -{ - CV_DbgAssert( this->it == ((const Mat_<_Tp>*)this->it.m)->end() ); - return Mat_<_Tp>(*this->it.m); -} - -template inline MatCommaInitializer_<_Tp>::operator Mat_<_Tp>() const { CV_DbgAssert( this->it == ((const Mat_<_Tp>*)this->it.m)->end() ); -- 2.7.4