From 8f6f9c3e58cfd64ab8d34cdf83cdcb636b4f7608 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Sat, 16 Nov 2013 20:14:01 +0400 Subject: [PATCH 1/2] compilation for VS2008 --- modules/core/include/opencv2/core/mat.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index 4cb12cccc1..8ddc16eb1d 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -1075,7 +1075,9 @@ template template inline Mat_<_Tp>::operator Vec template inline Mat_<_Tp>::operator Matx::channel_type, m, n>() const { CV_Assert(n % DataType<_Tp>::channels == 0); - return this->Mat::operator Matx::channel_type, m, n>(); + + Matx::channel_type, m, n> res = this->Mat::operator Matx::channel_type, m, n>(); + return res; } template inline void From 13bb236ad5e386c2571e40673dd4440eb1bc9968 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Sat, 16 Nov 2013 21:06:13 +0400 Subject: [PATCH 2/2] fixed some warnings --- modules/highgui/src/cap_openni.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/highgui/src/cap_openni.cpp b/modules/highgui/src/cap_openni.cpp index 51877128a3..402a0cd59f 100644 --- a/modules/highgui/src/cap_openni.cpp +++ b/modules/highgui/src/cap_openni.cpp @@ -172,6 +172,9 @@ public: xn::ImageGenerator &imageGenerator; private: + ApproximateSyncGrabber(const ApproximateSyncGrabber&); + ApproximateSyncGrabber& operator=(ApproximateSyncGrabber&); + int maxBufferSize; bool isCircleBuffer; int maxTimeDuration; @@ -215,7 +218,7 @@ private: virtual bool grab( xn::DepthMetaData& depthMetaData, xn::ImageMetaData& imageMetaData ) { - while(1) + for(;;) { if( !isDepthFilled ) isDepthFilled = popDepthMetaData(depth); @@ -971,7 +974,7 @@ double CvCapture_OpenNI::getDepthGeneratorProperty( int propIdx ) propValue = depthGenerator.GetAlternativeViewPointCap().IsViewPointAs(imageGenerator) ? 1.0 : 0.0; break; case CV_CAP_PROP_POS_MSEC : - propValue = depthGenerator.GetTimestamp(); + propValue = (double)depthGenerator.GetTimestamp(); break; case CV_CAP_PROP_POS_FRAMES : propValue = depthGenerator.GetFrameID(); @@ -1067,10 +1070,10 @@ double CvCapture_OpenNI::getImageGeneratorProperty( int propIdx ) propValue = mode.nFPS; break; case CV_CAP_PROP_POS_MSEC : - propValue = imageGenerator.GetTimestamp(); + propValue = (double)imageGenerator.GetTimestamp(); break; case CV_CAP_PROP_POS_FRAMES : - propValue = imageGenerator.GetFrameID(); + propValue = (double)imageGenerator.GetFrameID(); break; default : {