summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-25 02:26:34 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-25 02:26:34 +0300
commitc9f43996f3147100627ee2c6f9da993ceb160113 (patch)
tree7577f02f4658b19e05d586f66b67a9a4f5fedb7e /src/openglgraphics.cpp
parent8e19f9b9d792cf4d3d3b022fd26a258c3d3d97bf (diff)
downloadplus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.gz
plus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.bz2
plus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.xz
plus-c9f43996f3147100627ee2c6f9da993ceb160113.zip
Improve iterators part 2.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 9dd655420..40f1087d0 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -671,19 +671,22 @@ void OpenGLGraphics::drawImagePattern2(GraphicsVertexes *vert, Image *image)
std::vector<GLint*> *intVertPool = ogl->getIntVertPool();
std::vector<GLint*>::const_iterator iv;
+ std::vector<GLint*>::const_iterator iv_end = intVertPool->end();
std::vector<int> *vp = ogl->getVp();
std::vector<int>::const_iterator ivp;
+ std::vector<int>::const_iterator ivp_end = vp->end();
// Draw a set of textured rectangles
if (image->mTextureType == GL_TEXTURE_2D)
{
std::vector<GLfloat*> *floatTexPool = ogl->getFloatTexPool();
std::vector<GLfloat*>::const_iterator ft;
+ std::vector<GLfloat*>::const_iterator ft_end = floatTexPool->end();
for (iv = intVertPool->begin(), ft = floatTexPool->begin(),
ivp = vp->begin();
- iv != intVertPool->end(), ft != floatTexPool->end(),
- ivp != vp->end();
+ iv != iv_end, ft != ft_end,
+ ivp != ivp_end;
++ iv, ++ ft, ++ ivp)
{
drawQuadArrayfi(*iv, *ft, *ivp);
@@ -693,11 +696,12 @@ void OpenGLGraphics::drawImagePattern2(GraphicsVertexes *vert, Image *image)
{
std::vector<GLint*> *intTexPool = ogl->getIntTexPool();
std::vector<GLint*>::const_iterator it;
+ std::vector<GLint*>::const_iterator it_end = intTexPool->end();
for (iv = intVertPool->begin(), it = intTexPool->begin(),
ivp = vp->begin();
- iv != intVertPool->end(), it != intTexPool->end(),
- ivp != vp->end();
+ iv != iv_end, it != it_end,
+ ivp != ivp_end;
++ iv, ++ it, ++ ivp)
{
drawQuadArrayii(*iv, *it, *ivp);