diff options
Diffstat (limited to 'src/checks/level0/README-strict-iterators.md')
-rw-r--r-- | src/checks/level0/README-strict-iterators.md | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/checks/level0/README-strict-iterators.md b/src/checks/level0/README-strict-iterators.md deleted file mode 100644 index 0730710a..00000000 --- a/src/checks/level0/README-strict-iterators.md +++ /dev/null @@ -1,19 +0,0 @@ -# strict-iterators - -Warns when `iterator` objects are implicitly cast to `const_iterator`. -This is mostly equivalent to passing -DQT_STRICT_ITERATORS to the compiler. -This prevents detachments but also caches subtle bugs such as: - - QHash<int, int> wrong; - if (wrong.find(1) == wrong.cend()) { - qDebug() << "Not found"; - } else { - qDebug() << "Found"; // find() detached the container before cend() was called, so it prints "Found" - } - - QHash<int, int> right; - if (right.constFind(1) == right.cend()) { - qDebug() << "Not found"; // This is correct now ! - } else { - qDebug() << "Found"; - } |