diff options
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/MenuManager.cpp | 6 | ||||
| -rw-r--r-- | unity-shared/UBusWrapper.cpp | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/unity-shared/MenuManager.cpp b/unity-shared/MenuManager.cpp index e084001c6..c5eccab8f 100644 --- a/unity-shared/MenuManager.cpp +++ b/unity-shared/MenuManager.cpp @@ -165,10 +165,8 @@ struct Manager::Impl : sigc::trackable { for (auto it = entry_actions_.begin(); it != entry_actions_.end();) { - auto rm_it = it; - ++it; - key_grabber_->RemoveAction(*rm_it->second); - entry_actions_.erase(rm_it); + key_grabber_->RemoveAction(*it->second); + it = entry_actions_.erase(it); } } diff --git a/unity-shared/UBusWrapper.cpp b/unity-shared/UBusWrapper.cpp index 3f1699923..a66d4b5fd 100644 --- a/unity-shared/UBusWrapper.cpp +++ b/unity-shared/UBusWrapper.cpp @@ -34,10 +34,8 @@ UBusManager::~UBusManager() { for (auto it = connection_ids_.begin(); it != connection_ids_.end();) { - auto tmp_it = it; - ++it; - server->UnregisterInterest(*tmp_it); - connection_ids_.erase(tmp_it); + server->UnregisterInterest(*it); + it = connection_ids_.erase(it); } } |
