From f51ba0f681b6752a4c548ccf81662689f1587724 Mon Sep 17 00:00:00 2001 From: pixl Date: Wed, 15 Jul 2020 13:27:21 -0400 Subject: [PATCH] Remove unused assert warnings when building Release --- src/logid/backend/dj/Receiver.cpp | 6 ++---- src/logid/backend/hidpp/Device.cpp | 3 +-- src/logid/backend/raw/RawDevice.cpp | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/logid/backend/dj/Receiver.cpp b/src/logid/backend/dj/Receiver.cpp index 78909da..40cbbbd 100644 --- a/src/logid/backend/dj/Receiver.cpp +++ b/src/logid/backend/dj/Receiver.cpp @@ -267,8 +267,7 @@ void Receiver::_handleHidppEvent(hidpp::Report &report) void Receiver::addDjEventHandler(const std::string& nickname, const std::shared_ptr& handler) { - auto it = _dj_event_handlers.find(nickname); - assert(it == _dj_event_handlers.end()); + assert(_dj_event_handlers.find(nickname) == _dj_event_handlers.end()); _dj_event_handlers.emplace(nickname, handler); } @@ -286,8 +285,7 @@ Receiver::djEventHandlers() void Receiver::addHidppEventHandler(const std::string& nickname, const std::shared_ptr& handler) { - auto it = _hidpp_event_handlers.find(nickname); - assert(it == _hidpp_event_handlers.end()); + assert(_hidpp_event_handlers.find(nickname) == _hidpp_event_handlers.end()); _hidpp_event_handlers.emplace(nickname, handler); } diff --git a/src/logid/backend/hidpp/Device.cpp b/src/logid/backend/hidpp/Device.cpp index d4bf994..2a5045a 100644 --- a/src/logid/backend/hidpp/Device.cpp +++ b/src/logid/backend/hidpp/Device.cpp @@ -138,8 +138,7 @@ Device::~Device() void Device::addEventHandler(const std::string& nickname, const std::shared_ptr& handler) { - auto it = _event_handlers.find(nickname); - assert(it == _event_handlers.end()); + assert(_event_handlers.find(nickname) == _event_handlers.end()); _event_handlers.emplace(nickname, handler); } diff --git a/src/logid/backend/raw/RawDevice.cpp b/src/logid/backend/raw/RawDevice.cpp index c7d5ce5..e7f561f 100644 --- a/src/logid/backend/raw/RawDevice.cpp +++ b/src/logid/backend/raw/RawDevice.cpp @@ -459,8 +459,7 @@ void RawDevice::addEventHandler(const std::string& nickname, const std::shared_ptr& handler) { std::unique_lock lock(_event_handler_lock); - auto it = _event_handlers.find(nickname); - assert(it == _event_handlers.end()); + assert(_event_handlers.find(nickname) == _event_handlers.end()); assert(handler); _event_handlers.emplace(nickname, handler); }