[GRASS-SVN] r52114 - grass/trunk/raster/r.viewshed

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 17 11:38:33 PDT 2012


Author: mmetz
Date: 2012-06-17 11:38:33 -0700 (Sun, 17 Jun 2012)
New Revision: 52114

Modified:
   grass/trunk/raster/r.viewshed/eventlist.cpp
Log:
r.viewshed: fix event sorting

Modified: grass/trunk/raster/r.viewshed/eventlist.cpp
===================================================================
--- grass/trunk/raster/r.viewshed/eventlist.cpp	2012-06-17 18:37:11 UTC (rev 52113)
+++ grass/trunk/raster/r.viewshed/eventlist.cpp	2012-06-17 18:38:33 UTC (rev 52114)
@@ -694,8 +694,12 @@
 	/*a.angle == b.angle */
 	if (a.eventType == EXITING_EVENT)
 	    return -1;
-	else if (a.eventType == ENTERING_EVENT)
+	if (b.eventType == EXITING_EVENT)
 	    return 1;
+	if (a.eventType == ENTERING_EVENT)
+	    return 1;
+	if (b.eventType == ENTERING_EVENT)
+	    return -1;
 	return 0;
     }
 }



More information about the grass-commit mailing list