[Tomoe-cvs 1473] CVS update: tomoe/module/recognizer

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
2006年 11月 30日 (木) 18:58:39 JST


Index: tomoe/module/recognizer/tomoe-recognizer-simple-logic.c
diff -u tomoe/module/recognizer/tomoe-recognizer-simple-logic.c:1.1 tomoe/module/recognizer/tomoe-recognizer-simple-logic.c:1.2
--- tomoe/module/recognizer/tomoe-recognizer-simple-logic.c:1.1	Wed Nov 29 15:49:39 2006
+++ tomoe/module/recognizer/tomoe-recognizer-simple-logic.c	Thu Nov 30 18:58:39 2006
@@ -17,7 +17,7 @@
  *  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  *  Boston, MA  02111-1307  USA
  *
- *  $Id: tomoe-recognizer-simple-logic.c,v 1.1 2006/11/29 06:49:39 makeinu Exp $
+ *  $Id: tomoe-recognizer-simple-logic.c,v 1.2 2006/11/30 09:58:39 ikezoe Exp $
  */
 
 #include <stdlib.h>
@@ -279,11 +279,10 @@
      * if the length between last point and second last point is lesser than
      * LIMIT_LENGTH, the last itinerary assumes "hane".
      */
-    if (i_met[i_nop - 2].d < LIMIT_LENGTH) {
+    if (i_met[i_nop - 2].d < LIMIT_LENGTH)
         i_k_end = i_nop - 2;
-    } else {
+    else
         i_k_end = i_nop - 1;
-    }
   
     m = 0;
     for (i_k = 1; i_k < i_k_end; i_k++) {
@@ -361,11 +360,10 @@
      * if the length between last point and second last point is lesser than
      * LIMIT_LENGTH, the last itineraryassumes "hane".
      */
-    if (d_met[d_nop - 2].d < LIMIT_LENGTH) {
+    if (d_met[d_nop - 2].d < LIMIT_LENGTH)
         d_k_end = d_nop - 2;
-    } else {
+    else
         d_k_end = d_nop - 1;
-    }
 
     m = 0;
     for (d_k = 1; d_k < d_k_end - 1; d_k++) /* note difference: -1 */ {
@@ -569,9 +567,8 @@
 
         for (i = 0; i < adapted_num; i++) {
             j = g_array_index (adapted, gint, i);
-            if (j - pj >= 3) {
+            if (j - pj >= 3)
                 return -1;
-            }
             pj = j;
         }
     }
@@ -597,9 +594,8 @@
     TomoePoint *p;
 
     *most_node = NULL;
-    if (first_node == last_node) {
+    if (first_node == last_node)
         return 0;
-    }
 
     a = last->x - first->x;
     b = last->y - first->y;
@@ -680,7 +676,7 @@
 
     for (l = 0; l < a->len; l++) {
         if (g_array_index (a, gint, l) == i)
-	        return TRUE;
+	    return TRUE;
     }
     return FALSE;
 }
@@ -691,9 +687,9 @@
     guint i;
     GArray *b = g_array_new (FALSE, FALSE, sizeof (gint));
 
-    for (i = 0; i < a->len; i++) {
+    for (i = 0; i < a->len; i++)
         g_array_append_val (b, g_array_index (a, gint, i));
-    }
+
     return b;
 }
 


tomoe-cvs メーリングリストの案内
Back to archive index