mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-22 20:50:15 +00:00
Remove shared pointer, ODR of componentType variable
This commit is contained in:
@@ -48,7 +48,7 @@ namespace CppScripts {
|
||||
* Entities are composed of components which define their behavior.
|
||||
*/
|
||||
|
||||
using ComponentPtr = std::shared_ptr<Component>;
|
||||
using ComponentPtr = std::unique_ptr<Component>;
|
||||
|
||||
class Entity {
|
||||
public:
|
||||
@@ -278,15 +278,6 @@ public:
|
||||
template<typename Cmpt>
|
||||
Cmpt* GetComponent() const;
|
||||
|
||||
/**
|
||||
* @brief Get an owning reference to a component.
|
||||
*
|
||||
* @tparam Cmpt The component to get a shared reference of
|
||||
* @return std::shared_ptr<Cmpt> The owning shared pointer
|
||||
*/
|
||||
template<typename Cmpt>
|
||||
std::shared_ptr<Cmpt> GetSharedComponent() const;
|
||||
|
||||
/**
|
||||
* @brief Adds a component to this Entity.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user