Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

Commit e89c815

Browse files
authored
fix(IEntity): return a const reference to position (#4)
And also add an IAsset & as parameter in setAsset
1 parent 15b2af8 commit e89c815

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/ANAL/IEntity.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ namespace ANAL
3838
* @brief Get the current entity position
3939
* @return The position vector
4040
*/
41-
[[nodiscard]] virtual Vector2<int>& getPos() const = 0;
41+
[[nodiscard]] virtual const Vector2<int>& getPos() const = 0;
4242

4343
/**
4444
* @brief Set the entity asset used when rendering
4545
*/
46-
virtual void setAsset() = 0;
46+
virtual void setAsset(IAsset &asset) = 0;
4747

4848
/**
4949
* @brief Get the current entity asset

0 commit comments

Comments
 (0)