Closed Bug 1513387 Opened 5 years ago Closed 5 years ago

Add braces & newlines to cases where clang-format unwrapped a return statement to same line as its logic, in layout/svg.

Categories

(Core :: SVG, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

We had a number of cases in layout/svg with old code of the form:
   if (condition)
     return;

...which clang-format unwrapped to:
   if (condition) return;

...which is suboptimal from a readability and debuggability standpoint (e.g. you can't set a breakpoint on the return statement).

Filing this bug on cleaning those up (by adding braces around the return statement so that clang-format is OK with it being on its own line).

(did this as some nice mindless/offline work while on a long flight yesterday.)
This patch shouldn't affect behavior; it's just making the existing control
flow clearer and more debuggable.
Blocks: 1513393
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8bf181f9b1c3
Add braces & newlines to re-wrap some return statements that clang-format unwrapped, in layout/svg. r=heycam
https://hg.mozilla.org/mozilla-central/rev/8bf181f9b1c3
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: