diff --git a/include/level.hpp b/include/level.hpp index 385f2f3..34b997d 100644 --- a/include/level.hpp +++ b/include/level.hpp @@ -49,12 +49,12 @@ public: /** * Récupère la liste des objets */ - std::vector getObjects(); + std::vector& getObjects(); /** * Récupère la zone du niveau */ - std::vector> getZone(); + const std::vector>& getZone(); }; #endif diff --git a/src/level.cpp b/src/level.cpp index 5ce66b0..805f639 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -131,10 +131,10 @@ std::string Level::getName() { return name; } -std::vector Level::getObjects() { +std::vector& Level::getObjects() { return objects; } -std::vector> Level::getZone() { +const std::vector>& Level::getZone() { return zone; }