Bug ID: 392912
           Summary: Proposal for check qstring-allocations
           Product: clazy
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
  Target Milestone: ---


I continue using clazy for my project. And found out, as i think, one
particularly interesting case. Any string with single character for example "*"
will trigger check qstring-allocations. But does advice to use QStringLiteral
in this case is optimal? How about QChar or QLatin1Char? QStringLiteral gives
binary blow up if repeated several times, plus working with single char is more
efficient because no need to handle end of string (\0). Adding single
characters to a QString is faster if the characters are QChars and not
QStrings. Same holds for arguments to QString::startsWith(),
QString::endsWith(), QString::remove() and QString::section(). Maybe it is even
worth to match QStringLiteral("*") as unneeded complexity.

Sorry, if from your point of view i start a discussion here, i don't know
another way to reach you except of irc that i don't use. The email field is
empty on github.

You are receiving this mail because:
You are watching all bug changes.

Reply via email to