ソースを参照

Vlib: Vect_break_polygons() stop rtree search on first hit

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55792 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 年 前
コミット
2881d0edbd
1 ファイル変更3 行追加1 行削除
  1. 3 1
      lib/vector/Vlib/break_polygons.c

+ 3 - 1
lib/vector/Vlib/break_polygons.c

@@ -71,9 +71,11 @@ typedef struct
 static int fpoint;
 static int fpoint;
 
 
 /* Function called from RTreeSearch for point found */
 /* Function called from RTreeSearch for point found */
-static void srch(int id, const struct RTree_Rect *rect, int *arg)
+static int srch(int id, const struct RTree_Rect *rect, int *arg)
 {
 {
     fpoint = id;
     fpoint = id;
+    
+    return 0;	/* stop searching */
 }
 }
 
 
 /* function used by binary tree to compare items */
 /* function used by binary tree to compare items */