mirror of
https://github.com/deskflow/deskflow.git
synced 2026-07-04 21:04:59 +08:00
refactor: EventLogger sonar suggestion to define index2 in the if
This commit is contained in:
parent
0890bcac42
commit
bc9bc906a5
@ -270,8 +270,7 @@ void EventQueue::removeHandler(EventTypes type, void *target)
|
||||
HandlerTable::iterator index = m_handlers.find(target);
|
||||
if (index != m_handlers.end()) {
|
||||
TypeHandlerTable &typeHandlers = index->second;
|
||||
TypeHandlerTable::iterator index2 = typeHandlers.find(type);
|
||||
if (index2 != typeHandlers.end()) {
|
||||
if (auto index2 = typeHandlers.find(type); index2 != typeHandlers.end()) {
|
||||
typeHandlers.erase(index2);
|
||||
}
|
||||
if (typeHandlers.empty()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user