the 'empty' method should be used to check for emptiness instead of 'size'
Categories
(Developer Infrastructure :: Source Code Analysis, task, P5)
Tracking
(Not tracked)
People
(Reporter: Sylvestre, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=C++])
Attachments
(1 obsolete file)
Filling as a good first bug to learn workflows.
if (aHistogram.size() == 0) {
should use .empty() instead
https://searchfox.org/mozilla-central/source/gfx/layers/composite/FPSCounter.cpp#279
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
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Reporter | ||
Updated•5 years ago
|
Comment 1•4 years ago
|
||
Since the bug (use of the size() method instead of the more appropriate empty() one to check whether the aHistogram container is empty) was alread fixed in the meantime, I rechanged the code to its previous state (aHistogram.size() == 0).
Hence, please reject this patch and I will then re-submit the file with the correct snippet (aHistogram.empty()). Had I not corrected the file in some way, Watchman would have not identified any change to the source code and I would have been able to test the workflow. Thanks.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 2•4 years ago
|
||
This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
I wanted to work on this bug, but It's already fixed in my source code
Reporter | ||
Comment 4•4 years ago
|
||
Indeed, thanks
I have other bugs like this one. Would you like me to create one?
(In reply to Sylvestre Ledru [:Sylvestre] from comment #4)
Indeed, thanks
I have other bugs like this one. Would you like me to create one?
yes please, thank you :)
Comment 6•4 years ago
|
||
Since you have other bugs like this one, may I also work on a bug?
Reporter | ||
Comment 7•4 years ago
|
||
Andi can open new bugs for you folks :)
Comment 8•4 years ago
|
||
(In reply to Sylvestre Ledru [:Sylvestre] from comment #7)
Andi can open new bugs for you folks :)
Awesome!
Comment 9•4 years ago
|
||
Can I take this up ? How to contribute to this bug ?
Reporter | ||
Comment 10•4 years ago
|
||
Andi will create a few bugs for you folks :)
Comment 11•3 years ago
|
||
(In reply to Sylvestre Ledru [:Sylvestre] from comment #4)
Indeed, thanks
I have other bugs like this one. Would you like me to create one?
Please do create. Its really great for new comers to understand stuff.
Thank You.
Reporter | ||
Comment 12•3 years ago
|
||
I reported about 10 new bugs. See the new bugs referenced in bug 712350
Reporter | ||
Updated•3 years ago
|
Updated•2 years ago
|
Description
•