summaryrefslogtreecommitdiff
path: root/shortcuts
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2015-02-03 10:46:48 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2015-02-03 10:46:48 +0100
commit6a6bb14cb03f4203efa09985bdbc15270a4011ab (patch)
treee662770aa6ccf43ae74a6547c8b7393e7388e906 /shortcuts
parent35ec9452c22f81279a8489364c212f08a67ed3f9 (diff)
Unity: Use unordered_map whenever possible
As iterating over it seems just fast as in the ordered version, we just speedup lookups and insertions. (bzr r3899.2.51)
Diffstat (limited to 'shortcuts')
-rw-r--r--shortcuts/ShortcutModel.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/shortcuts/ShortcutModel.h b/shortcuts/ShortcutModel.h
index ed656b251..3dd0024cf 100644
--- a/shortcuts/ShortcutModel.h
+++ b/shortcuts/ShortcutModel.h
@@ -21,7 +21,7 @@
#define UNITYSHELL_SHORTCUS_MODEL_H
#include <boost/noncopyable.hpp>
-#include <map>
+#include <unordered_map>
#include <memory>
#include <list>
#include <string>
@@ -43,7 +43,7 @@ public:
nux::Property<int> categories_per_column;
std::vector<std::string> const& categories() const { return categories_; }
- std::map<std::string, std::list<AbstractHint::Ptr>> const& hints() const { return hints_; }
+ std::unordered_map<std::string, std::list<AbstractHint::Ptr>> const& hints() const { return hints_; }
void Fill();
@@ -51,7 +51,7 @@ private:
void AddHint(AbstractHint::Ptr const& hint);
std::vector<std::string> categories_;
- std::map<std::string, std::list<AbstractHint::Ptr>> hints_;
+ std::unordered_map<std::string, std::list<AbstractHint::Ptr>> hints_;
};
}