https://bugs.kde.org/show_bug.cgi?id=377617
Bug ID: 377617 Summary: clazy-qstring-left makes false assumption Product: clazy Version: unspecified Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: unassigned-b...@kde.org Reporter: markus.enzenber...@gmail.com CC: smart...@kde.org Target Milestone: --- The clazy-qstring-left warning makes the false assumption that QString::left(1) can be replaced by the more efficient QString::at(0). This is not true in general. It is illegal to call QString::at() with an invalid position, but QString::left() may be called with an empty string (in which case it also returns an empty string). There could exist code, which relies on this and uses QString::left(1) to avoid handling the extra case in the calling code. -- You are receiving this mail because: You are watching all bug changes.