Fixed constness of functions in scene graph

This commit is contained in:
Cocoa 2022-09-20 15:35:10 +08:00
parent c0290b7185
commit f4bf895e45
2 changed files with 5 additions and 5 deletions

View File

@ -114,7 +114,7 @@ namespace SHADE
return parent;
}
std::vector<SHSceneNode*>& SHSceneNode::GetChildren() noexcept
const std::vector<SHSceneNode*>& SHSceneNode::GetChildren() const noexcept
{
return children;
}

View File

@ -47,11 +47,11 @@ namespace SHADE
/* Getter Functions */
/*---------------------------------------------------------------------------------*/
[[nodiscard]] EntityID GetEntityID () const noexcept;
[[nodiscard]] SHSceneNode* GetParent () const noexcept;
[[nodiscard]] std::vector<SHSceneNode*>& GetChildren () noexcept;
[[nodiscard]] EntityID GetEntityID () const noexcept;
[[nodiscard]] SHSceneNode* GetParent () const noexcept;
[[nodiscard]] const std::vector<SHSceneNode*>& GetChildren () const noexcept;
[[nodiscard]] SHSceneNode* GetChild (EntityID childID) const noexcept;
[[nodiscard]] SHSceneNode* GetChild (EntityID childID) const noexcept;
/*---------------------------------------------------------------------------------*/
/* Setter Functions */