From 07675230038a24dd251581591379c8fe5cc7bfd1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Apr 2016 20:11:07 +0300 Subject: Add memory count functions into MapLayer and SpecailLayer. Also change all memory count functions into const methods. --- src/resources/atlas/atlasresource.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/resources/atlas/atlasresource.cpp') diff --git a/src/resources/atlas/atlasresource.cpp b/src/resources/atlas/atlasresource.cpp index d48394698..9ecc32692 100644 --- a/src/resources/atlas/atlasresource.cpp +++ b/src/resources/atlas/atlasresource.cpp @@ -71,17 +71,17 @@ void AtlasResource::decRef() AtlasManager::moveToDeleted(this); } -int AtlasResource::calcMemoryLocal() +int AtlasResource::calcMemoryLocal() const { return sizeof(AtlasResource) + Resource::calcMemoryLocal() + atlases.capacity() * sizeof(TextureAtlas*); } -int AtlasResource::calcMemoryChilds(const int level) +int AtlasResource::calcMemoryChilds(const int level) const { int sz = 0; - FOR_EACH (std::vector::iterator, it, atlases) + FOR_EACH (std::vector::const_iterator, it, atlases) { TextureAtlas *const atlas = *it; sz += atlas->calcMemory(level + 1); -- cgit v1.2.3-60-g2f50