diff options
Diffstat (limited to 'src/checks/level1/README-qstring-left.md')
-rw-r--r-- | src/checks/level1/README-qstring-left.md | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/checks/level1/README-qstring-left.md b/src/checks/level1/README-qstring-left.md deleted file mode 100644 index b4b53a98..00000000 --- a/src/checks/level1/README-qstring-left.md +++ /dev/null @@ -1,9 +0,0 @@ -# qstring-left - -Finds places where you're using `QString::left(1)` instead of `QString::at(0)`. -The later form is cheaper, as it doesn't deep-copy the string. - -There's however another difference between the two: `left(1)` will return an empty -string if the string is empty, while `QString::at(0)` will assert. So be sure -that the string can't be empty, or add a `if (!str.isEmpty()` guard, which is still -faster than calling `left()` for the cases which deep-copy. |