From 8e619e4d02521af385049411aecc3169dc991f96 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 27 Nov 2022 19:51:59 +0100 Subject: [PATCH] [dump] Small optimisation. Refs #198 --- src/viewer/dump/dump.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/viewer/dump/dump.c b/src/viewer/dump/dump.c index a4a1153d..1adc6fc4 100644 --- a/src/viewer/dump/dump.c +++ b/src/viewer/dump/dump.c @@ -221,6 +221,10 @@ is_start_of_link(struct document *document, int x, int y, int *current_link_numb *ret = link; return 1; } + + if (link->points[0].y > y) { + break; + } } return 0; } @@ -238,6 +242,10 @@ is_end_of_link(struct document *document, int x, int y, int *current_link_number *ret = link; return 1; } + + if (link->points[0].y > y) { + break; + } } return 0; }