readstrings.cpp: the 'empty' method should be used to check for emptiness instead of 'size'
Categories
(Developer Infrastructure :: Source Code Analysis, task)
Tracking
(firefox96 fixed)
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: tawahpeggy98, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=C++])
Attachments
(1 file, 3 obsolete files)
Filling as a good first bug to learn workflows.
if (mKeys.size() < 1) {
should use .empty() instead
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.
Assignee | ||
Comment 1•3 years ago
|
||
readstring.cpp:the empty method should be used to check for emptiness instead of the size method.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Hello Sylvestre,
please I would appreciate if you can help me review this.
thanks,
Peggy
Reporter | ||
Comment 3•3 years ago
|
||
Peggy, you already have feedback by bytesized. See:
https://phabricator.services.mozilla.com/D129718#4215456
Assignee | ||
Comment 4•3 years ago
|
||
okay, thank you very much Sylvestre
Assignee | ||
Comment 5•3 years ago
|
||
readstrings.cpp:the empty method should be used to check for emptiness instead of the size method.
Depends on D129751
Assignee | ||
Comment 6•3 years ago
|
||
readstrings.cpp:the empty method shoud be used to check for emptiness instead of the size method.
Assignee | ||
Comment 7•3 years ago
|
||
readstrings.cpp:the empty method should be used to check for emptiness instead of the size method.
Reporter | ||
Comment 8•3 years ago
|
||
Could you please close (abandon) the old reviews ?
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 9•3 years ago
|
||
(In reply to Sylvestre Ledru [:Sylvestre] from comment #8)
Could you please close (abandon) the old reviews ?
I have done so
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•