Skip to content

Commit

Permalink
Simplify network callback handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Sep 26, 2024
1 parent cc71453 commit 595b153
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/NetworkSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ bool NetworkSettingsClass::onEvent(NetworkEventCb cbEvent, const network_event e

void NetworkSettingsClass::raiseEvent(const network_event event)
{
for (uint32_t i = 0; i < _cbEventList.size(); i++) {
const NetworkEventCbList_t entry = _cbEventList[i];
for (auto& entry : _cbEventList) {
if (entry.cb) {
if (entry.event == event || entry.event == network_event::NETWORK_EVENT_MAX) {
entry.cb(event);
Expand Down

0 comments on commit 595b153

Please sign in to comment.