[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461

andrei zavada jh at johnhommer.com
Fri Nov 16 00:50:05 UTC 2012


The following commit has been merged in the master branch:
commit c4e465dbd83a03662979931d16a83ea45ed966bd
Author: andrei zavada <jh at johnhommer.com>
Date:   Fri Oct 5 09:09:54 2012 +0000

    fix channel_near

diff --git a/src/ui/scoring-facility.cc b/src/ui/scoring-facility.cc
index c1d505b..9fe17a1 100644
--- a/src/ui/scoring-facility.cc
+++ b/src/ui/scoring-facility.cc
@@ -592,13 +592,11 @@ channel_near( int y)
 	for ( auto &H : channels ) {
 		if ( H.hidden )
 			continue;
-		thisy = y - H.zeroy;
-		if ( thisy < 0 ) {
-			if ( -thisy < nearest )
-				return &const_cast<SChannel&>(H);
-			else
-				return nearest_h;
-		}
+		thisy = (y > H.zeroy) ? y - H.zeroy : H.zeroy - y;
+			// if ( thisy < nearest )
+			// 	return &const_cast<SChannel&>(H);
+			// else
+			// 	return nearest_h;
 		if ( thisy < nearest ) {
 			nearest = thisy;
 			nearest_h = &H;

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list