summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/graphicsvertexes.cpp6
-rw-r--r--src/graphicsvertexes.h4
-rw-r--r--src/map.h4
3 files changed, 11 insertions, 3 deletions
diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp
index b8e236310..7a3077ce3 100644
--- a/src/graphicsvertexes.cpp
+++ b/src/graphicsvertexes.cpp
@@ -33,7 +33,7 @@ const unsigned int vertexBufSize = 500;
SDLGraphicsVertexes::SDLGraphicsVertexes()
{
-
+ mList.reserve(30);
}
SDLGraphicsVertexes::~SDLGraphicsVertexes()
@@ -47,6 +47,10 @@ OpenGLGraphicsVertexes::OpenGLGraphicsVertexes() :
mIntTexArray(0),
mIntVertArray(0)
{
+ mFloatTexPool.reserve(30);
+ mIntVertPool.reserve(30);
+ mIntTexPool.reserve(30);
+ mVp.reserve(30);
}
OpenGLGraphicsVertexes::~OpenGLGraphicsVertexes()
diff --git a/src/graphicsvertexes.h b/src/graphicsvertexes.h
index 55740ac98..b01496b09 100644
--- a/src/graphicsvertexes.h
+++ b/src/graphicsvertexes.h
@@ -121,7 +121,9 @@ class ImageVertexes
ImageVertexes() :
image(0),
ogl(new OpenGLGraphicsVertexes())
- { }
+ {
+ sdl.reserve(30);
+ }
~ImageVertexes();
diff --git a/src/map.h b/src/map.h
index 749c77ce5..1df4a6d9d 100644
--- a/src/map.h
+++ b/src/map.h
@@ -60,7 +60,9 @@ class MapRowVertexes
{
public:
MapRowVertexes()
- { }
+ {
+ images.reserve(30);
+ }
~MapRowVertexes();