Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 273 Bytes

README-isempty-vs-count.md

File metadata and controls

11 lines (9 loc) · 273 Bytes

isempty-vs-count

Finds places where you're using Container::count() or Container::size() instead of Container::isEmpty(). Although there's no performance benefit, isEmpty() provides better semantics.

Example

QList<int> foo;
...
if (foo.count()) {}