More standard pointers.

This commit is contained in:
2023-11-12 19:52:41 -06:00
parent aa7ea94669
commit 3836d68033
17 changed files with 48 additions and 62 deletions

View File

@ -41,7 +41,7 @@ namespace Dawn {
void updateChildrenTransforms();
public:
Scene *scene;
std::weak_ptr<Scene> scene;
sceneitemid_t id;
// I have no idea if I'm keeping this
StateEvent<> eventTransformUpdated;
@ -53,7 +53,7 @@ namespace Dawn {
* @param scene Weak pointer to the Scene that this SceneItem belongs to.
* @param id Scene Item ID that the Scene assigned this SceneItem.
*/
SceneItem(Scene *scene, sceneitemid_t id);
SceneItem(std::weak_ptr<Scene> scene, sceneitemid_t id);
/**
* Called by the Scene the frame after we were constructed so we can begin
@ -310,7 +310,7 @@ namespace Dawn {
* no parent for this transform.
* @return Pointer to the parent transform, or nullptr.
*/
std::weak_ptr<SceneItem> getParent();
std::shared_ptr<SceneItem> getParent();
/**
* Returns true if this transform is a child of the given transform, this