diff options
Diffstat (limited to 'src/walklayer.cpp')
-rw-r--r-- | src/walklayer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/walklayer.cpp b/src/walklayer.cpp index 6a18ba205..53ac31048 100644 --- a/src/walklayer.cpp +++ b/src/walklayer.cpp @@ -23,12 +23,12 @@ #include "debug.h" WalkLayer::WalkLayer(const int width, const int height) : + Resource(), mWidth(width), - mHeight(height) + mHeight(height), + mTiles(new int[width * height]) { - const int sz = width * height; - mTiles = new int[sz]; - std::fill_n(mTiles, sz, 0); + std::fill_n(mTiles, width * height, 0); } WalkLayer::~WalkLayer() |