[clazy] [Bug 402917] New: Check converting number to string
Roman
bugzilla_noreply at kde.org
Sun Jan 6 11:18:10 GMT 2019
https://bugs.kde.org/show_bug.cgi?id=402917
Bug ID: 402917
Summary: Check converting number to string
Product: clazy
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: minor
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: dismine at gmail.com
CC: smartins at kde.org
Target Milestone: ---
I have found in my code strings like this:
int value = 2; // just an example
...
QString("%1").arg(value)
Clazy complains about qstring-allocations here. This is correct, but such a
code has small sense since we could just write
QString::number(value) or QString().number(value)
It seems Clazy could improve readability if advises replace single placeholder
(%1-%99) with conversion from number.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list