From: Tobias Markus Date: Thu, 19 Mar 2015 12:41:57 +0000 (+0100) Subject: Const'ify methods in sector.cpp X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2fee8cb489f155b847abb2fd90580c4cab5f3cda;p=supertux.git Const'ify methods in sector.cpp --- diff --git a/src/supertux/level.cpp b/src/supertux/level.cpp index 386cd3f11..311ec12d7 100644 --- a/src/supertux/level.cpp +++ b/src/supertux/level.cpp @@ -174,13 +174,13 @@ Level::get_sector(const std::string& name_) } size_t -Level::get_sector_count() +Level::get_sector_count() const { return sectors.size(); } Sector* -Level::get_sector(size_t num) +Level::get_sector(size_t num) const { return sectors.at(num); } diff --git a/src/supertux/level.hpp b/src/supertux/level.hpp index aadc49b78..fcc10578d 100644 --- a/src/supertux/level.hpp +++ b/src/supertux/level.hpp @@ -62,8 +62,8 @@ public: Sector* get_sector(const std::string& name); - size_t get_sector_count(); - Sector* get_sector(size_t num); + size_t get_sector_count() const; + Sector* get_sector(size_t num) const; const TileSet *get_tileset() const { return tileset; }