mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 18:33:39 +02:00
map::map: Use in-place constructor
This commit is contained in:
parent
eb42ab4764
commit
54603edcb9
1 changed files with 1 additions and 3 deletions
4
map.h
4
map.h
|
@ -36,10 +36,8 @@ public:
|
||||||
class tile **tiles;
|
class tile **tiles;
|
||||||
int w, h;
|
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];
|
tiles = new class tile * [w * h];
|
||||||
|
|
||||||
for (int y = 0; y < h; y++) {
|
for (int y = 0; y < h; y++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue