From owner-svn-ports-head@FreeBSD.ORG Tue Dec 16 19:58:30 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BDBCAB5; Tue, 16 Dec 2014 19:58:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD76399; Tue, 16 Dec 2014 19:58:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBGJwUBv074669; Tue, 16 Dec 2014 19:58:30 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBGJwURe074668; Tue, 16 Dec 2014 19:58:30 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201412161958.sBGJwURe074668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Tue, 16 Dec 2014 19:58:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r374818 - head/graphics/opencv/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2014 19:58:30 -0000 Author: antoine Date: Tue Dec 16 19:58:29 2014 New Revision: 374818 URL: https://svnweb.freebsd.org/changeset/ports/374818 QAT: https://qat.redports.org/buildarchive/r374818/ Log: Fix build with clang 3.5 Obtained from: https://github.com/Itseez/opencv/pull/3488/ PR: ports/195727 Added: head/graphics/opencv/files/patch-modules_legacy_src_calibfilter.cpp (contents, props changed) Added: head/graphics/opencv/files/patch-modules_legacy_src_calibfilter.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/opencv/files/patch-modules_legacy_src_calibfilter.cpp Tue Dec 16 19:58:29 2014 (r374818) @@ -0,0 +1,123 @@ +--- modules/legacy/src/calibfilter.cpp.orig 2014-04-11 10:15:26 UTC ++++ modules/legacy/src/calibfilter.cpp +@@ -95,11 +95,8 @@ bool CvCalibFilter::SetEtalon( CvCalibEt + + Stop(); + +- if (latestPoints != NULL) +- { +- for( i = 0; i < MAX_CAMERAS; i++ ) +- cvFree( latestPoints + i ); +- } ++ for( i = 0; i < MAX_CAMERAS; i++ ) ++ cvFree( latestPoints + i ); + + if( type == CV_CALIB_ETALON_USER || type != etalonType ) + { +@@ -529,64 +526,61 @@ void CvCalibFilter::DrawPoints( CvMat** + return; + } + +- if( latestCounts ) ++ for( i = 0; i < cameraCount; i++ ) + { +- for( i = 0; i < cameraCount; i++ ) ++ if( dstarr[i] && latestCounts[i] ) + { +- if( dstarr[i] && latestCounts[i] ) +- { +- CvMat dst_stub, *dst; +- int count = 0; +- bool found = false; +- CvPoint2D32f* pts = 0; ++ CvMat dst_stub, *dst; ++ int count = 0; ++ bool found = false; ++ CvPoint2D32f* pts = 0; + +- GetLatestPoints( i, &pts, &count, &found ); ++ GetLatestPoints( i, &pts, &count, &found ); + +- dst = cvGetMat( dstarr[i], &dst_stub ); ++ dst = cvGetMat( dstarr[i], &dst_stub ); + +- static const CvScalar line_colors[] = +- { +- {{0,0,255}}, +- {{0,128,255}}, +- {{0,200,200}}, +- {{0,255,0}}, +- {{200,200,0}}, +- {{255,0,0}}, +- {{255,0,255}} +- }; ++ static const CvScalar line_colors[] = ++ { ++ {{0,0,255}}, ++ {{0,128,255}}, ++ {{0,200,200}}, ++ {{0,255,0}}, ++ {{200,200,0}}, ++ {{255,0,0}}, ++ {{255,0,255}} ++ }; + +- const int colorCount = sizeof(line_colors)/sizeof(line_colors[0]); +- const int r = 4; +- CvScalar color = line_colors[0]; +- CvPoint prev_pt = { 0, 0}; ++ const int colorCount = sizeof(line_colors)/sizeof(line_colors[0]); ++ const int r = 4; ++ CvScalar color = line_colors[0]; ++ CvPoint prev_pt = { 0, 0}; + +- for( j = 0; j < count; j++ ) +- { +- CvPoint pt; +- pt.x = cvRound(pts[j].x); +- pt.y = cvRound(pts[j].y); ++ for( j = 0; j < count; j++ ) ++ { ++ CvPoint pt; ++ pt.x = cvRound(pts[j].x); ++ pt.y = cvRound(pts[j].y); + +- if( found ) +- { +- if( etalonType == CV_CALIB_ETALON_CHESSBOARD ) +- color = line_colors[(j/cvRound(etalonParams[0]))%colorCount]; +- else +- color = CV_RGB(0,255,0); ++ if( found ) ++ { ++ if( etalonType == CV_CALIB_ETALON_CHESSBOARD ) ++ color = line_colors[(j/cvRound(etalonParams[0]))%colorCount]; ++ else ++ color = CV_RGB(0,255,0); + +- if( j != 0 ) +- cvLine( dst, prev_pt, pt, color, 1, CV_AA ); +- } ++ if( j != 0 ) ++ cvLine( dst, prev_pt, pt, color, 1, CV_AA ); ++ } + +- cvLine( dst, cvPoint( pt.x - r, pt.y - r ), +- cvPoint( pt.x + r, pt.y + r ), color, 1, CV_AA ); ++ cvLine( dst, cvPoint( pt.x - r, pt.y - r ), ++ cvPoint( pt.x + r, pt.y + r ), color, 1, CV_AA ); + +- cvLine( dst, cvPoint( pt.x - r, pt.y + r), +- cvPoint( pt.x + r, pt.y - r), color, 1, CV_AA ); ++ cvLine( dst, cvPoint( pt.x - r, pt.y + r), ++ cvPoint( pt.x + r, pt.y - r), color, 1, CV_AA ); + +- cvCircle( dst, pt, r+1, color, 1, CV_AA ); ++ cvCircle( dst, pt, r+1, color, 1, CV_AA ); + +- prev_pt = pt; +- } ++ prev_pt = pt; + } + } + }