
* core/object_groups.hh: Add more preconditions. * filter/object_groups_small.hh: Call duplicate(). --- scribo/ChangeLog | 8 ++++++++ scribo/core/object_groups.hh | 2 ++ scribo/filter/object_groups_small.hh | 5 +++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index a7134fa..da11249 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,13 @@ 2010-04-13 Guillaume Lazzara <z@lrde.epita.fr> + Small fixes related to object_groups. + + * core/object_groups.hh: Add more preconditions. + + * filter/object_groups_small.hh: Call duplicate(). + +2010-04-13 Guillaume Lazzara <z@lrde.epita.fr> + Add init() member to object_links structure. * core/object_links.hh: New init() member. diff --git a/scribo/core/object_groups.hh b/scribo/core/object_groups.hh index be97c06..97334f2 100644 --- a/scribo/core/object_groups.hh +++ b/scribo/core/object_groups.hh @@ -165,6 +165,7 @@ namespace scribo const object_links<L>& object_groups<L>::links() const { + mln_assertion(data_ != 0); return data_->links_; } @@ -172,6 +173,7 @@ namespace scribo void object_groups<L>::init_(const object_links<L>& links) { + mln_assertion(data_ != 0); data_->comp_to_group_ = links.comp_to_link(); } diff --git a/scribo/filter/object_groups_small.hh b/scribo/filter/object_groups_small.hh index 60f8753..f736a50 100644 --- a/scribo/filter/object_groups_small.hh +++ b/scribo/filter/object_groups_small.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -77,7 +78,7 @@ namespace scribo for_all_groups(i, group_size) ++group_size[groups(i)]; - object_groups<L> output(groups); + object_groups<L> output = groups.duplicate(); output(0) = 0; for_all_groups(i, output) if (group_size[groups(i)] < n_links -- 1.5.6.5