Return Tile walking creatures and things by const ref instead of copy (#1117)

This commit is contained in:
vfjpl 2020-11-23 17:26:15 +01:00 committed by GitHub
parent 18dd9c2d2d
commit f521737b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,8 +88,8 @@ public:
int getDrawElevation() { return m_drawElevation; } int getDrawElevation() { return m_drawElevation; }
std::vector<ItemPtr> getItems(); std::vector<ItemPtr> getItems();
std::vector<CreaturePtr> getCreatures(); std::vector<CreaturePtr> getCreatures();
std::vector<CreaturePtr> getWalkingCreatures() { return m_walkingCreatures; } const std::vector<CreaturePtr>& getWalkingCreatures() { return m_walkingCreatures; }
std::vector<ThingPtr> getThings() { return m_things; } const std::vector<ThingPtr>& getThings() { return m_things; }
ItemPtr getGround(); ItemPtr getGround();
int getGroundSpeed(); int getGroundSpeed();
uint8 getMinimapColorByte(); uint8 getMinimapColorByte();