diff options
Diffstat (limited to 'src/checks/level0/README-qstring-insensitive-allocation.md')
-rw-r--r-- | src/checks/level0/README-qstring-insensitive-allocation.md | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/checks/level0/README-qstring-insensitive-allocation.md b/src/checks/level0/README-qstring-insensitive-allocation.md deleted file mode 100644 index d3b2a7e3..00000000 --- a/src/checks/level0/README-qstring-insensitive-allocation.md +++ /dev/null @@ -1,12 +0,0 @@ -# qstring-insensitive-allocation - -Finds unneeded memory allocations such as - `if (str.toLower().contains("foo"))` which you should fix as - `if (str.contains("foo", Qt::CaseInsensitive))` to avoid the heap allocation caused by toLower(). - -Matches any of the following cases: - `str.{toLower, toUpper}().{contains, compare, startsWith, endsWith}()` - -#### Pitfalls -`Qt::CaseInsensitive` is different from `QString::toLower()` comparison for a few code points, but it -should be very rare: <http://lists.qt-project.org/pipermail/development/2016-February/024776.html> |