nsWindow.cpp: do not use 'else' after 'return'
Categories
(Developer Infrastructure :: Source Code Analysis, task)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: nikopacheco22, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=C++])
Attachments
(1 file, 2 obsolete files)
+++ This bug was initially created as a clone of Bug #1626762 +++
+++ This bug was initially created as a clone of Bug #1626761 +++
Filling as a good first bug to learn workflows.
if (parentWidget) {
return DesktopToLayoutDeviceScale(
parentWidget->RoundsWidgetCoordinatesTo());
} else {
NS_WARNING("Widget has no parent");
}
do not use 'else' after 'return'
https://searchfox.org/mozilla-central/source/widget/gtk/nsWindow.cpp#806
As the change is pretty easy, it is mostly 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/tools/docs/contribute/how_to_contribute_firefox.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Assignee | ||
Comment 1•5 years ago
|
||
Depends on D70144
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D70145
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D70145
Updated•5 years ago
|
Reporter | ||
Comment 4•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Sorry! I had some issues with hg commit --amend, because I made many changes. I should use hg histedit instead. I think I did it correctly now.
Thanks for you help.
Comment 7•5 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•