https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Nicolas Ballas <ballas(a)lrde.epita.fr>
Fix a bug in the paste routine.
* mln/level/paste.spe.hh: Update.
paste.spe.hh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Index: mln/level/paste.spe.hh
--- mln/level/paste.spe.hh (revision 2807)
+++ mln/level/paste.spe.hh (working copy)
@@ -139,13 +139,13 @@
template <typename I, typename J>
void paste_singleton(const Image<I>& input_, Image<J>&
output_)
{
- trace::entering("level::impl::paste_fast_singleton");
+ trace::entering("level::impl::paste_singleton");
const I& input = exact(input_);
level::fill_with_value(output_, input.val());
- trace::entering("level::impl::paste_fast_singleton");
+ trace::entering("level::impl::paste_singleton");
}
} // end of namespace impl.
@@ -167,7 +167,8 @@
const I& input = exact(input_);
J& output = exact(output_);
- if (input.border() == output.border())
+ if (input.border() == output.border() &&
+ sizeof(mln_value(I)) == sizeof(mln_value(J)))
impl::paste_fastest(input, output);
else
impl::paste_fast(input, output);
@@ -182,7 +183,10 @@
const Image<I>& input,
Image<J>& output)
{
+ if (sizeof(mln_value(I)) == sizeof(mln_value(J)))
impl::paste_fastest(input, output);
+ else
+ impl::paste_fast(input, output);
}