From c669b7e4cdd9ec1311b1eed4109f01ee572018bf Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Mon, 1 Dec 2014 17:58:06 +0300 Subject: [PATCH] Simplify overengineered code --- modules/videoio/src/cap_giganetix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/videoio/src/cap_giganetix.cpp b/modules/videoio/src/cap_giganetix.cpp index e252a16430..02d9e042b9 100644 --- a/modules/videoio/src/cap_giganetix.cpp +++ b/modules/videoio/src/cap_giganetix.cpp @@ -393,7 +393,8 @@ CvCaptureCAM_Giganetix::open( int index ) for (int i = 0; i < (int) DevicesList.size() && !b_ret; i++) { - if((b_ret = i == index)) + b_ret = (i == index); + if(b_ret) { m_device = DevicesList[i]; b_ret = m_device->Connect ();