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