Skip to content

Commit

Permalink
Change a few member functions to const
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Mar 29, 2015
1 parent 9762ee8 commit b3fa4e3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/control/input_manager.cpp
Expand Up @@ -44,7 +44,7 @@ InputManager::~InputManager()
}

Controller*
InputManager::get_controller()
InputManager::get_controller() const
{
return controller.get();
}
Expand Down
2 changes: 1 addition & 1 deletion src/control/input_manager.hpp
Expand Up @@ -60,7 +60,7 @@ class InputManager final : public Currenton<InputManager>
void use_game_controller(bool v);
bool use_game_controller() const { return m_use_game_controller; }

Controller* get_controller();
Controller* get_controller() const;

private:
std::unique_ptr<Controller> controller;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/menu.cpp
Expand Up @@ -642,7 +642,7 @@ Menu::get_item_by_id(int id) const
throw std::runtime_error("MenuItem not found");
}

int Menu::get_active_item_id()
int Menu::get_active_item_id() const
{
return items[active_item]->id;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/menu.hpp
Expand Up @@ -77,7 +77,7 @@ class Menu
MenuItem& get_item_by_id(int id);
const MenuItem& get_item_by_id(int id) const;

int get_active_item_id();
int get_active_item_id() const;
void set_active_item(int id);

void draw(DrawingContext& context);
Expand Down

0 comments on commit b3fa4e3

Please sign in to comment.