Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7a2e4fb

Browse filesBrowse files
committed
Constness fix for iterator dereference
1 parent a699050 commit 7a2e4fb
Copy full SHA for 7a2e4fb

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎cores/esp8266/MultiDelegate.h

Copy file name to clipboardExpand all lines: cores/esp8266/MultiDelegate.h
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ namespace delegate
244244
bool operator!=(const iterator& rhs) const {
245245
return !operator==(rhs);
246246
}
247-
const Delegate& operator*() const
247+
Delegate& operator*() const
248248
{
249249
return current->mDelegate;
250250
}
251-
const Delegate* const operator->() const
251+
Delegate* const operator->() const
252252
{
253253
return &current->mDelegate;
254254
}
@@ -349,7 +349,7 @@ namespace delegate
349349
auto it = begin();
350350
while (it)
351351
{
352-
if (del == &it.current->mDelegate)
352+
if (del == &(*it))
353353
{
354354
erase(it);
355355
return true;
@@ -382,7 +382,7 @@ namespace delegate
382382
R result;
383383
do
384384
{
385-
result = CallP<Delegate, R, ISQUEUE, P...>::execute(it.current->mDelegate, args...);
385+
result = CallP<Delegate, R, ISQUEUE, P...>::execute(*it, args...);
386386
if (result && ISQUEUE)
387387
it = erase(it);
388388
else
@@ -422,7 +422,7 @@ namespace delegate
422422
R result;
423423
do
424424
{
425-
result = Call<Delegate, R, ISQUEUE>::execute(it.current->mDelegate);
425+
result = Call<Delegate, R, ISQUEUE>::execute(*it);
426426
if (result && ISQUEUE)
427427
it = this->erase(it);
428428
else
@@ -477,7 +477,7 @@ namespace delegate
477477

478478
do
479479
{
480-
CallP<Delegate, void, ISQUEUE, P...>::execute(it.current->mDelegate, args...);
480+
CallP<Delegate, void, ISQUEUE, P...>::execute(*it, args...);
481481
if (ISQUEUE)
482482
it = this->erase(it);
483483
else
@@ -515,7 +515,7 @@ namespace delegate
515515

516516
do
517517
{
518-
Call<Delegate, void, ISQUEUE>::execute(it.current->mDelegate);
518+
Call<Delegate, void, ISQUEUE>::execute(*it);
519519
if (ISQUEUE)
520520
it = this->erase(it);
521521
else

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.