summaryrefslogtreecommitdiff
path: root/src/resources/atlasmanager.cpp
diff options
context:
space:
mode:
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;