hyprland-source/hyprpm/src/core/PluginManager.cpp: 8 * ineffective calls to substr ? #11718
Replies: 3 comments
-
|
Lmao. Really? Is a single allocation really that bad? Or is it worth it to keep it for readability? |
Beta Was this translation helpful? Give feedback.
-
|
Cppcheck reported 137 performance problems. I sampled some of them. |
Beta Was this translation helpful? Give feedback.
-
|
I mean yeah could be fixed, feel free to submit a MR, but these aren't in any hot paths so it doesn't matter that much. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Static analyser cppcheck says:
hyprland-source/hyprpm/src/core/PluginManager.cpp:103:21: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
hyprland-source/hyprpm/src/core/PluginManager.cpp:440:24: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
hyprland-source/hyprpm/src/core/PluginManager.cpp:442:24: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
hyprland-source/hyprpm/src/core/PluginManager.cpp:555:31: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
hyprland-source/hyprpm/src/core/PluginManager.cpp:556:31: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
hyprland-source/hyprpm/src/core/PluginManager.cpp:91:28: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
hyprland-source/hyprpm/src/core/PluginManager.cpp:94:28: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
hyprland-source/hyprpm/src/core/PluginManager.cpp:97:26: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
hyprland $
Might be worth fixing.
Beta Was this translation helpful? Give feedback.
All reactions