Closed Bug 1398999 Opened 2 years ago Closed 2 years ago

nsDequeFunctor::operator() doesn't need to return anything

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: gerald, Assigned: gerald)

Details

Attachments

(1 file)

nsDequeFunctor::operator() return void*, but this return value is never used; and most implementations return nullptr anyway.
So it could just not return anything.
Comment on attachment 8906885 [details]
Bug 1398999 - nsDequeFunctor::operator() doesn't need to return anything -

https://reviewboard.mozilla.org/r/178618/#review183790

I guess we could have it return something to indicate that `ForEach` should stop iterating, but apparently clients are not consistent in their return values anyway.  So this is a reasonable cleanup...as much as `nsDeque` can be cleaned up.

Thanks!
Attachment #8906885 - Flags: review?(nfroyd) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1a96a71425be
nsDequeFunctor::operator() doesn't need to return anything - r=froydnj
Thank you for the quick review Nathan.

> as much as `nsDeque` can be cleaned up.
I've got great plans for nsDeque, just you wait!
https://hg.mozilla.org/mozilla-central/rev/1a96a71425be
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.