X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fstage.h;h=47ca47d9a572b6c5742e5a5279877d5af983584c;hb=c7d0e1aff305778f97974b329826628966380158;hp=060759696914264ce5c177c0d1674a154b253e52;hpb=248d62f7240d342982ade65a510be912b867fe49;p=libs%2Fgame.git diff --git a/source/game/stage.h b/source/game/stage.h index 0607596..47ca47d 100644 --- a/source/game/stage.h +++ b/source/game/stage.h @@ -4,17 +4,19 @@ #include #include #include "handle.h" -#include "root.h" namespace Msp::Game { +class Root; class System; class Stage { private: PoolPool pools; - Root root; + /* Use unique_ptr because there's only one root per stage so it's pointless + to put it in a pool. */ + std::unique_ptr root; std::vector> systems; public: @@ -22,7 +24,7 @@ public: ~Stage(); PoolPool &get_pools() { return pools; } - Handle get_root() { return Handle::from_object(&root); } + Handle get_root() { return Handle::from_object(root.get()); } template void iterate_objects(const F &);