mirror of https://github.com/odrling/Aegisub
Make agi::hotkey::Scan const
Originally committed to SVN as r5229.
This commit is contained in:
parent
4abb905130
commit
cd4b032c25
|
@ -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) {
|
bool Hotkey::Scan(const std::string &context, const std::string &str, std::string &cmd) const {
|
||||||
HotkeyMap::iterator index;
|
HotkeyMap::const_iterator index;
|
||||||
std::pair<HotkeyMap::iterator, HotkeyMap::iterator> range;
|
std::pair<HotkeyMap::const_iterator, HotkeyMap::const_iterator> range;
|
||||||
|
|
||||||
range = map.equal_range(str);
|
range = map.equal_range(str);
|
||||||
std::string local, dfault;
|
std::string local, dfault;
|
||||||
|
|
|
@ -106,7 +106,7 @@ public:
|
||||||
/// @param context Context requested.
|
/// @param context Context requested.
|
||||||
/// @param str Hyphen separated key sequence.
|
/// @param str Hyphen separated key sequence.
|
||||||
/// @param[out] cmd Command found.
|
/// @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:
|
private:
|
||||||
typedef std::multimap<std::string, Combo*> HotkeyMap; ///< Map to hold Combo instances.
|
typedef std::multimap<std::string, Combo*> HotkeyMap; ///< Map to hold Combo instances.
|
||||||
|
|
Loading…
Reference in New Issue