Make agi::hotkey::Scan const

Originally committed to SVN as r5229.
This commit is contained in:
Thomas Goyne 2011-01-17 23:53:38 +00:00
parent 4abb905130
commit cd4b032c25
2 changed files with 4 additions and 4 deletions

View file

@ -129,9 +129,9 @@ void Hotkey::BuildHotkey(std::string context, const json::Object& object) {
}
bool Hotkey::Scan(const std::string &context, const std::string &str, std::string &cmd) {
HotkeyMap::iterator index;
std::pair<HotkeyMap::iterator, HotkeyMap::iterator> range;
bool Hotkey::Scan(const std::string &context, const std::string &str, std::string &cmd) const {
HotkeyMap::const_iterator index;
std::pair<HotkeyMap::const_iterator, HotkeyMap::const_iterator> range;
range = map.equal_range(str);
std::string local, dfault;

View file

@ -106,7 +106,7 @@ public:
/// @param context Context requested.
/// @param str Hyphen separated key sequence.
/// @param[out] cmd Command found.
bool Scan(const std::string &context, const std::string &str, std::string &cmd);
bool Scan(const std::string &context, const std::string &str, std::string &cmd) const;
private:
typedef std::multimap<std::string, Combo*> HotkeyMap; ///< Map to hold Combo instances.