diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2015-02-09 19:09:17 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2015-02-09 19:09:17 +0100 |
| commit | 7efdf1353911e14e146ebe037cd2ea4f59533825 (patch) | |
| tree | 30cb5d536946a88fe268e30f8733fc1765892af8 /UnityCore | |
| parent | fa8d4d20017ed681435c7c8ddc8a0f180bde786f (diff) | |
AppmenuIndicator: just use operator[] to access to window entries vector
(bzr r3899.2.70)
Diffstat (limited to 'UnityCore')
| -rw-r--r-- | UnityCore/AppmenuIndicator.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/UnityCore/AppmenuIndicator.cpp b/UnityCore/AppmenuIndicator.cpp index 70864e29f..7ddb8c8c9 100644 --- a/UnityCore/AppmenuIndicator.cpp +++ b/UnityCore/AppmenuIndicator.cpp @@ -36,18 +36,7 @@ struct AppmenuIndicator::Impl Impl(AppmenuIndicator* parent) { connections_.Add(parent->on_entry_added.connect([this] (Entry::Ptr const& entry) { - auto it = window_entries_.find(entry->parent_window()); - - if (it != window_entries_.end()) - { - auto& entries = it->second; - entries.push_back(entry); - window_entries_.insert({entry->parent_window(), entries}); - } - else - { - window_entries_.insert({entry->parent_window(), {entry}}); - } + window_entries_[entry->parent_window()].push_back(entry); })); connections_.Add(parent->on_entry_removed.connect([this] (Entry::Ptr const& entry) { |
