aboutsummaryrefslogtreecommitdiffstats
path: root/src/checks/manuallevel/README-isempty-vs-count.md
blob: 4db9a33fa1b487027080c2f71eddb712e413b1d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
# 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()) {}
```