---
scribo/ChangeLog | 5 +++++
.../primitive/link/internal/link_functor_base.hh | 9 +++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index baca941..df923b8 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-21 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * scribo/primitive/link/internal/link_functor_base.hh: Stop
+ neighbor lookup when a separator is found.
+
2011-03-14 Guillaume Lazzara <z(a)lrde.epita.fr>
Fix namespace ambiguities.
diff --git a/scribo/scribo/primitive/link/internal/link_functor_base.hh
b/scribo/scribo/primitive/link/internal/link_functor_base.hh
index d214c91..5b4fefa 100644
--- a/scribo/scribo/primitive/link/internal/link_functor_base.hh
+++ b/scribo/scribo/primitive/link/internal/link_functor_base.hh
@@ -232,9 +232,14 @@ namespace scribo
{
(void) start_point;
mln_value(L) v = this->labeled_image_(p);
- bool is_separator = this->components_.separators()(p);
- if (is_separator)
+ // We found that we are passing through a separator. We stop
+ // looking up for a neighbor by returning true.
+ //
+ // Since we don't want to link with a separator,
+ // verify_link_criterion will invalidate this link.
+ //
+ if (this->components_.has_separators() &&
this->components_.separators()(p))
return true;
return v != literal::zero // Not the background
--
1.5.6.5
Show replies by date