Closed Bug 1713528 Opened 3 years ago Closed 3 years ago

widget/GfxInfoBase.cpp: do not use 'else' after 'return'

Categories

(Core :: Widget: Gtk, task)

task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: Sylvestre, Assigned: jakob)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=C++])

Attachments

(1 file)

Filling as a good first bug to learn workflows.

do not use 'else' after 'return':
https://searchfox.org/mozilla-central/rev/5977b6fdebe32451ada35fa2cbd7c0752cfea982/widget/GfxInfoBase.cpp#315-357
Remove all the "else", they are useless

As the change is trivial, it is just to learn how to contribute to Firefox.

Found by http://clang.llvm.org/extra/clang-tidy/checks/readability-else-after-return.html

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

There are further occurrences of 'else if' statements after 'return' in functions other than 'BlocklistOSToOperatingSystem':
https://searchfox.org/mozilla-central/source/widget/GfxInfoBase.cpp#452-475

Should I leave those open for future good first bug opportunities?

Flags: needinfo?(sledru)

sure, don't hesitate to fix them here too

Flags: needinfo?(sledru)
Assignee: nobody → jakob
Status: NEW → ASSIGNED

Sorry for bothering, but I can't land the stack myself (don't have level 3 commit access).
Am I supposed to get this access level, or can someone else land this?

Flags: needinfo?(sledru)
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ef897f64483e
Change 'else if' after return to 'if'. r=aosmond
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

done :)

Flags: needinfo?(sledru)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: