[Groonga-commit] groonga/groonga at 75a8ca6 [master] Put operator to the line end

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Feb 5 17:44:38 JST 2016


Kouhei Sutou	2016-02-05 17:44:38 +0900 (Fri, 05 Feb 2016)

  New Revision: 75a8ca628b4381c6f2977fc7fc1f9cd429a26760
  https://github.com/groonga/groonga/commit/75a8ca628b4381c6f2977fc7fc1f9cd429a26760

  Message:
    Put operator to the line end

  Modified files:
    lib/pat.c
    lib/proc.c

  Modified: lib/pat.c (+5 -5)
===================================================================
--- lib/pat.c    2016-02-05 17:43:17 +0900 (ec49cce)
+++ lib/pat.c    2016-02-05 17:44:38 +0900 (fed5323)
@@ -1320,11 +1320,11 @@ calc_edit_distance_by_offset(grn_ctx *ctx,
         b = DIST(x, y - 1) + 1;
         c = DIST(x - 1, y - 1) + 1;
         DIST(x, y) = ((a < b) ? ((a < c) ? a : c) : ((b < c) ? b : c));
-        if (flags & GRN_TABLE_FUZZY_SEARCH_WITH_TRANSPOSITION
-            && x > 1 && y > 1
-            && cx == cy
-            && memcmp(px, py - cy, cx) == 0
-            && memcmp(px - cx, py, cx) == 0) {
+        if (flags & GRN_TABLE_FUZZY_SEARCH_WITH_TRANSPOSITION &&
+            x > 1 && y > 1 &&
+            cx == cy &&
+            memcmp(px, py - cy, cx) == 0 &&
+            memcmp(px - cx, py, cx) == 0) {
           uint32_t t = DIST(x - 2, y - 2) + 1;
           DIST(x, y) = ((DIST(x, y) < t) ? DIST(x, y) : t);
         }

  Modified: lib/proc.c (+4 -4)
===================================================================
--- lib/proc.c    2016-02-05 17:43:17 +0900 (3243200)
+++ lib/proc.c    2016-02-05 17:44:38 +0900 (eadf2eb)
@@ -4341,10 +4341,10 @@ calc_edit_distance(grn_ctx *ctx, char *sx, char *ex, char *sy, char *ey, int fla
           uint32_t b = DIST(x, y - 1) + 1;
           uint32_t c = DIST(x - 1, y - 1) + 1;
           DIST(x, y) = ((a < b) ? ((a < c) ? a : c) : ((b < c) ? b : c));
-          if (flags & GRN_TABLE_FUZZY_SEARCH_WITH_TRANSPOSITION
-              && x > 1 && y > 1 && cx == cy
-              && memcmp(px, py - cy, cx) == 0
-              && memcmp(px - cx, py, cx) == 0) {
+          if (flags & GRN_TABLE_FUZZY_SEARCH_WITH_TRANSPOSITION &&
+              x > 1 && y > 1 && cx == cy &&
+              memcmp(px, py - cy, cx) == 0 &&
+              memcmp(px - cx, py, cx) == 0) {
             uint32_t t = DIST(x - 2, y - 2) + 1;
             DIST(x, y) = ((DIST(x, y) < t) ? DIST(x, y) : t);
           }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index