aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diffseq.h
diff options
context:
space:
mode:
authorPaul Eggert2017-06-17 15:12:50 -0700
committerPaul Eggert2017-06-17 15:13:21 -0700
commit209ddb1092940c65c4c684fa6d0d8c4e3c6e6bdd (patch)
tree09280010c8531a0cda6f7b30e8b82807a712ed8f /lib/diffseq.h
parent4caa8d4de4cc9c84b2d49a75f24c1626aa3c3f73 (diff)
downloademacs-209ddb1092940c65c4c684fa6d0d8c4e3c6e6bdd.tar.gz
emacs-209ddb1092940c65c4c684fa6d0d8c4e3c6e6bdd.zip
Merge from gnulib
This (and my previous patch) incorporate: 2017-06-17 diffseq: port to GCC 7 with --enable-gcc-warnings 2017-06-15 gettext-h: Update comment * lib/diffseq.h: Copy from gnulib.
Diffstat (limited to 'lib/diffseq.h')
-rw-r--r--lib/diffseq.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/diffseq.h b/lib/diffseq.h
index d7a374357c7..a3cf140990b 100644
--- a/lib/diffseq.h
+++ b/lib/diffseq.h
@@ -279,6 +279,11 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal,
279 continue; 279 continue;
280 280
281#ifdef USE_HEURISTIC 281#ifdef USE_HEURISTIC
282 bool heuristic = ctxt->heuristic;
283#else
284 bool heuristic = false;
285#endif
286
282 /* Heuristic: check occasionally for a diagonal that has made lots 287 /* Heuristic: check occasionally for a diagonal that has made lots
283 of progress compared with the edit distance. If we have any 288 of progress compared with the edit distance. If we have any
284 such, find the one that has made the most progress and return it 289 such, find the one that has made the most progress and return it
@@ -287,7 +292,7 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal,
287 With this heuristic, for vectors with a constant small density 292 With this heuristic, for vectors with a constant small density
288 of changes, the algorithm is linear in the vector size. */ 293 of changes, the algorithm is linear in the vector size. */
289 294
290 if (200 < c && big_snake && ctxt->heuristic) 295 if (200 < c && big_snake && heuristic)
291 { 296 {
292 { 297 {
293 OFFSET best = 0; 298 OFFSET best = 0;
@@ -367,7 +372,6 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal,
367 } 372 }
368 } 373 }
369 } 374 }
370#endif /* USE_HEURISTIC */
371 375
372 /* Heuristic: if we've gone well beyond the call of duty, give up 376 /* Heuristic: if we've gone well beyond the call of duty, give up
373 and report halfway between our best results so far. */ 377 and report halfway between our best results so far. */