summaryrefslogtreecommitdiff
path: root/src/resources/atlasmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-01 23:56:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-02 14:28:17 +0300
commit520a495c466793c29f3e721634dfe6cc616b8ede (patch)
tree749b67f5d4df83f6f4997dabeb66ec394eabccd7 /src/resources/atlasmanager.cpp
parentf9030497b6196ce2fadb6b6ada5d784be227d9a6 (diff)
downloadmanaplus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.gz
manaplus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.bz2
manaplus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.xz
manaplus-520a495c466793c29f3e721634dfe6cc616b8ede.zip
Add missing const.
Diffstat (limited to 'src/resources/atlasmanager.cpp')
-rw-r--r--src/resources/atlasmanager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp
index c3ba82fdd..1dad94a09 100644
--- a/src/resources/atlasmanager.cpp
+++ b/src/resources/atlasmanager.cpp
@@ -133,13 +133,14 @@ void AtlasManager::loadImages(const StringVect &files,
void AtlasManager::simpleSort(const std::string &restrict name,
std::vector<TextureAtlas*> &restrict atlases,
- std::vector<Image*> &restrict images, int size)
+ const std::vector<Image*> &restrict images,
+ int size)
{
int x = 0;
int y = 0;
int tempHeight = 0;
TextureAtlas *atlas = new TextureAtlas();
- std::vector<Image*>::iterator it = images.begin();
+ std::vector<Image*>::const_iterator it = images.begin();
const std::vector<Image*>::const_iterator it_end = images.end();
for (it = images.begin(); it != it_end; ++ it)
{
@@ -297,10 +298,10 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas)
}
}
-void AtlasManager::injectToResources(AtlasResource *const resource)
+void AtlasManager::injectToResources(const AtlasResource *const resource)
{
ResourceManager *const resman = ResourceManager::getInstance();
- FOR_EACH (std::vector<TextureAtlas*>::iterator, it, resource->atlases)
+ FOR_EACH (std::vector<TextureAtlas*>::const_iterator, it, resource->atlases)
{
// add each atlas image to resources
TextureAtlas *const atlas = *it;