diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-29 21:03:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-29 21:03:25 +0300 |
commit | 10b7c4a1313395291a77c50189b31e9daf38a2b0 (patch) | |
tree | 8f0eea8bc2567b0431bb03d45126786cddddcf60 /src/resources/map/objectslayer.cpp | |
parent | 5f6e0176cc64824a28391070ddb249a6efff0b7c (diff) | |
download | manaverse-10b7c4a1313395291a77c50189b31e9daf38a2b0.tar.gz manaverse-10b7c4a1313395291a77c50189b31e9daf38a2b0.tar.bz2 manaverse-10b7c4a1313395291a77c50189b31e9daf38a2b0.tar.xz manaverse-10b7c4a1313395291a77c50189b31e9daf38a2b0.zip |
Add memory counting into ObjectsLayer.
Diffstat (limited to 'src/resources/map/objectslayer.cpp')
-rw-r--r-- | src/resources/map/objectslayer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/map/objectslayer.cpp b/src/resources/map/objectslayer.cpp index ea4f6a27f..7af758d7f 100644 --- a/src/resources/map/objectslayer.cpp +++ b/src/resources/map/objectslayer.cpp @@ -74,3 +74,9 @@ MapObjectList *ObjectsLayer::getAt(const unsigned x, const unsigned y) const return nullptr; return mTiles[x + y * mWidth]; } + +int ObjectsLayer::calcMemoryLocal() const +{ + return sizeof(ObjectsLayer) + + (sizeof(MapObjectList) + sizeof(MapObjectList*)) * mWidth * mHeight; +} |