Closed Bug 1742091 Opened 2 years ago Closed 2 years ago

DrawTargetCairo.cpp: the 'empty' method should be used to check for emptiness instead of 'size'

Categories

(Developer Infrastructure :: Source Code Analysis, task)

Tracking

(firefox97 fixed)

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: Sylvestre, Assigned: vincent.couvert, Mentored)

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.

mPushedLayers.size()
should use .empty() instead

https://searchfox.org/mozilla-central/rev/0f3e259c24e52932387318ac503bfad3c82baa44/gfx/2d/DrawTargetCairo.cpp#1624

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-container-size-empty.html

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html

Attachment #9251781 - Attachment description: Bug 1742091 - DrawTargetCairo.cpp: Use the 'empty' method instead of 'size' to check for emptiness instead of 'size'. r?sylvestre → Bug 1742091 - DrawTargetCairo.cpp: Use the 'empty' method instead of 'size' to check for emptiness. r?sylvestre,jrmuizel
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5dc535c8ba7e
DrawTargetCairo.cpp: Use the 'empty' method instead of 'size' to check for emptiness. r=sylvestre
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: