瀏覽代碼

Vlib: clean up code

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53768 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 年之前
父節點
當前提交
a3c34f92e8
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8 6
      lib/vector/Vlib/merge_lines.c

+ 8 - 6
lib/vector/Vlib/merge_lines.c

@@ -28,14 +28,16 @@ static int compare_cats(struct line_cats *ACats, struct line_cats *BCats)
 {
 {
     int i, j;
     int i, j;
 
 
-    if (ACats->n_cats == 0 && BCats->n_cats == 0)
-	return 0;
+    if (ACats->n_cats == 0 || BCats->n_cats == 0) {
+	if (ACats->n_cats == 0 && BCats->n_cats == 0)
+	    return 0;
 
 
-    if (ACats->n_cats == 0 && BCats->n_cats > 0)
-	return 1;
+	if (ACats->n_cats == 0 && BCats->n_cats > 0)
+	    return 1;
 
 
-    if (ACats->n_cats > 0 && BCats->n_cats == 0)
-	return 1;
+	if (ACats->n_cats > 0 && BCats->n_cats == 0)
+	    return 1;
+    }
 
 
     for (i = 0; i < ACats->n_cats; i++) {
     for (i = 0; i < ACats->n_cats; i++) {
 	int found = 0;
 	int found = 0;