map::map: Use in-place constructor

This commit is contained in:
Petr Baudis 2011-11-27 00:04:45 +01:00
parent eb42ab4764
commit 54603edcb9

4
map.h
View file

@ -36,10 +36,8 @@ public:
class tile **tiles;
int w, h;
map(int w_, int h_)
map(int w_, int h_) : w(w_), h(h_)
{
w = w_;
h = h_;
tiles = new class tile * [w * h];
for (int y = 0; y < h; y++) {