Deeangbandのフルスクラッチ新ソースコード。BSD系ライセンスを採用予定。
修订版 | 64a5070d00c711c1d15241fe5680f69a800eaf27 (tree) |
---|---|
时间 | 2014-02-28 00:20:19 |
作者 | Habu <habu@user...> |
Commiter | Habu |
use 'make_shared' helper function instead of std::shared_ptr<T>(new T())
@@ -19,7 +19,7 @@ Floor::Floor() | ||
19 | 19 | { |
20 | 20 | width = 50; |
21 | 21 | height = 50; |
22 | - squares = vector<vector<shared_ptr<Square>>> (height, vector<shared_ptr<Square>>(width, shared_ptr<Square>(new Square(this)))); | |
22 | + squares = vector<vector<shared_ptr<Square>>> (height, vector<shared_ptr<Square>>(width, make_shared<Square>(this))); | |
23 | 23 | } |
24 | 24 | |
25 | 25 | Floor::~Floor() |