From c9f43996f3147100627ee2c6f9da993ceb160113 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Apr 2012 02:26:34 +0300 Subject: Improve iterators part 2. --- src/graphics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/graphics.cpp') diff --git a/src/graphics.cpp b/src/graphics.cpp index 955b0fef5..44ff11783 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -504,11 +504,13 @@ void Graphics::drawImagePattern2(GraphicsVertexes *vert, Image *img) // here not checking input parameters std::vector *arr = vert->getRectsSDL(); - std::vector::const_iterator it; - for (it = arr->begin(); it != arr->end(); ++it) + for (std::vector::const_iterator it = arr->begin(), + it_end = arr->end(); it != it_end; ++it) + { SDL_LowerBlit(img->mSDLSurface, &(*it)->src, mTarget, &(*it)->dst); // SDL_BlitSurface(img->mSDLSurface, &(*it)->src, mTarget, &(*it)->dst); + } } bool Graphics::calcImageRect(GraphicsVertexes* vert, -- cgit v1.2.3-60-g2f50