From 5042f5daa7c83f3112a51494abefbd93494a7661 Mon Sep 17 00:00:00 2001 From: Alexander Reshetnikov Date: Thu, 12 Apr 2012 13:35:48 +0000 Subject: [PATCH] Fixed compilation error under Linux (memset for pvapi was moved to constructor) --- modules/highgui/src/cap_pvapi.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/highgui/src/cap_pvapi.cpp b/modules/highgui/src/cap_pvapi.cpp index 1020e17..0e3f03f 100644 --- a/modules/highgui/src/cap_pvapi.cpp +++ b/modules/highgui/src/cap_pvapi.cpp @@ -109,6 +109,7 @@ protected: CvCaptureCAM_PvAPI::CvCaptureCAM_PvAPI() { monocrome=false; + memset(&this->Camera, 0, sizeof(this->tCamera)); } void CvCaptureCAM_PvAPI::Sleep(unsigned int time) { @@ -358,8 +359,6 @@ CvCapture* cvCreateCameraCapture_PvAPI( int index ) { CvCaptureCAM_PvAPI* capture = new CvCaptureCAM_PvAPI; - memset(&capture->Camera, 0, sizeof(tCamera)); - if ( capture->open( index )) return capture; -- 2.7.4