-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update render component and delete unused code (#1429)
* Update a few components to use smart pointers for memory management * 'final' keyword added to classes * removed duplicate 'const' * removed unused code * Updated render component to store effects directly in a vector * Use move instead of copy * make pointers const * attribute tags * nitpicking * delete default effect constructor * Added a vector size check to the RemoveEffect() function * use empty() instead of size()
- Loading branch information
Showing
5 changed files
with
46 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,22 @@ | ||
/* | ||
* Darkflame Universe | ||
* Copyright 2018 | ||
* Copyright 2024 | ||
*/ | ||
|
||
#ifndef PROPERTYCOMPONENT_H | ||
#define PROPERTYCOMPONENT_H | ||
|
||
#include "BitStream.h" | ||
#include "Entity.h" | ||
#include "Component.h" | ||
#include "eReplicaComponentType.h" | ||
|
||
struct PropertyState { | ||
LWOOBJID ownerID; | ||
LWOOBJID propertyID; | ||
bool rented; | ||
}; | ||
|
||
/** | ||
* This component is unused and has no functionality | ||
*/ | ||
class PropertyComponent final : public Component { | ||
public: | ||
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY; | ||
explicit PropertyComponent(Entity* parentEntity); | ||
~PropertyComponent() override; | ||
[[nodiscard]] PropertyState* GetPropertyState() const { return m_PropertyState; }; | ||
private: | ||
PropertyState* m_PropertyState; | ||
std::string m_PropertyName; | ||
explicit PropertyComponent(Entity* const parentEntity) noexcept : Component{ parentEntity } {} | ||
}; | ||
|
||
#endif // PROPERTYCOMPONENT_H | ||
#endif // !PROPERTYCOMPONENT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters