From 12a2ee6a4abc8c80a5bda9e282599d03d20478d3 Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 7 Jul 2013 22:30:56 +0000 Subject: [PATCH] --- Magick++/lib/Magick++/STL.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Magick++/lib/Magick++/STL.h b/Magick++/lib/Magick++/STL.h index bc629a8ff..8dd6f4e22 100644 --- a/Magick++/lib/Magick++/STL.h +++ b/Magick++/lib/Magick++/STL.h @@ -1858,25 +1858,23 @@ namespace Magick MagickCore::Image* previous = 0; ::ssize_t scene = 0; for ( InputIterator iter = first_; iter != last_; ++iter ) - { - // Unless we reduce the reference count to one, the same image - // structure may occur more than once in the container, causing - // the linked list to fail. - iter->modifyImage(); - - MagickCore::Image* current = iter->image(); + { + // Unless we reduce the reference count to one, the same image + // structure may occur more than once in the container, causing + // the linked list to fail. + iter->modifyImage(); - current->previous = previous; - current->next = 0; + MagickCore::Image* current = iter->image(); - if ( previous != 0) - previous->next = current; + current->previous = previous; + current->next = 0; + current->scene = scene++; - current->scene=scene; - ++scene; + if ( previous != 0) + previous->next = current; - previous = current; - } + previous = current; + } } // Remove links added by linkImages. This should be called after the -- 2.40.0