diff options
Diffstat (limited to 'src/resources/atlas/atlasitem.h')
-rw-r--r-- | src/resources/atlas/atlasitem.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/resources/atlas/atlasitem.h b/src/resources/atlas/atlasitem.h index 37e021ee8..3a9f05f8d 100644 --- a/src/resources/atlas/atlasitem.h +++ b/src/resources/atlas/atlasitem.h @@ -24,12 +24,14 @@ #ifdef USE_OPENGL #include "resources/image.h" +#include "resources/memorycounter.h" #include <string> -struct AtlasItem final +struct AtlasItem final : public MemoryCounter { explicit AtlasItem(Image *const image0) : + MemoryCounter(), image(image0), name(), x(0), @@ -41,6 +43,13 @@ struct AtlasItem final A_DELETE_COPY(AtlasItem) + int calcMemoryLocal() override final + { + return sizeof(AtlasItem) + + name.capacity(); + // +++ here need print, but not add to sum size of image + } + Image *image; std::string name; int x; |