Closed Bug 1759845 Opened 2 years ago Closed 2 years ago

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

Categories

(Developer Infrastructure :: Source Code Analysis, task)

Tracking

(firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: Sylvestre, Assigned: jainabhinav2k16, Mentored)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1759844 +++

Filling as a good first bug to learn workflows.

usage->validUnpacks.size()
should use .empty() instead

two occurrences:
https://searchfox.org/mozilla-central/rev/fa69d8b248e6c1df670aa6b019e30ec37e6672be/dom/canvas/WebGLFormats.cpp#1177
https://searchfox.org/mozilla-central/rev/fa69d8b248e6c1df670aa6b019e30ec37e6672be/dom/canvas/WebGLFormats.cpp#1189

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

Tutorials to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.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.

Assignee: nobody → jainabhinav2k16
Status: NEW → ASSIGNED
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5da6ab7735ff
used !foo.empty() instead of foo.size(). r=jgilbert
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 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

Creator:
Created:
Updated:
Size: