Page MenuHomePhabricator

Bug 1601856 : convert NS_STYLE_VISIBILITY_* to an enum class in nsStyleConsts.h r=emilio
ClosedPublic

Authored by jeffin143 on Dec 6 2019, 4:38 AM.

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jeffin143 created this revision.Dec 6 2019, 4:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2019, 4:38 AM
phab-bot requested review of this revision.Dec 6 2019, 4:38 AM
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: Restricted Project.

Code analysis found 1 defect in the diff 203822:

  • 1 defect found by clang-tidy

You can run this analysis locally with:

  • ./mach static-analysis check layout/xul/nsDeckFrame.cpp (C/C++)

If you see a problem in this automated review, please report it here.

layout/xul/nsDeckFrame.cpp
141–142

Warning: Statement should be inside braces [clang-tidy: readability-braces-around-statements]
Checker reliability is high, meaning that the false positive ratio is low.

emilio accepted this revision.Dec 6 2019, 6:36 AM

Looks great, thanks so much for this!

layout/style/nsStyleStruct.cpp
3167–3168

If while you're here you want to remove the redundant parenthesis that'd be great :)

layout/style/nsStyleStruct.h
1278

Same here.

1282–1283

Same here. All parens in these two lines are useless and just noise.

layout/tables/nsTableRowFrame.cpp
1213

In all the conditions that look like this you could also remove the parens without loss in readability IMO.

layout/xul/nsDeckFrame.cpp
141–142

If you want to fix the reviewbot nit it'd be awesome too :)

This revision is now accepted and ready to land.Dec 6 2019, 6:36 AM
jeffin143 updated this revision to Diff 206530.Dec 12 2019, 4:17 AM
lobot added a subscriber: lobot.

Check-in Needed handled, landing queued.

jeffin143 updated this revision to Diff 207295.Dec 13 2019, 5:32 AM