more const correctness in OpenNI2 getProperty
authorJoe Howse <josephhowse@nummist.com>
Sat, 27 Dec 2014 04:11:14 +0000 (00:11 -0400)
committerJoe Howse <josephhowse@nummist.com>
Sat, 27 Dec 2014 04:11:14 +0000 (00:11 -0400)
modules/videoio/src/cap_openni2.cpp

index d5d48d9..cfe51eb 100644 (file)
@@ -466,7 +466,7 @@ double CvCapture_OpenNI2::getCommonProperty( int propIdx ) const
         propValue = getDepthGeneratorProperty( propIdx );
         break;
     case CV_CAP_PROP_OPENNI2_SYNC :
-        propValue = device.getDepthColorSyncEnabled();
+        propValue = const_cast<CvCapture_OpenNI2 *>(this)->device.getDepthColorSyncEnabled();
     case CV_CAP_PROP_OPENNI2_MIRROR:
     {
         bool isMirroring = color.getMirroringEnabled() && depth.getMirroringEnabled();