Fixed compilation error under Linux (memset for pvapi was moved to constructor)
authorAlexander Reshetnikov <no@email>
Thu, 12 Apr 2012 13:35:48 +0000 (13:35 +0000)
committerAlexander Reshetnikov <no@email>
Thu, 12 Apr 2012 13:35:48 +0000 (13:35 +0000)
modules/highgui/src/cap_pvapi.cpp

index 1020e17..0e3f03f 100644 (file)
@@ -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;