QRegularExpression ?
-
What is the reason for getting this "warning"?
What is so special about NOT creating g temporary objects ?
match is in function, hence already temporary... -
This warning is not about matching, it's about the regex object. Constructing it is expensive, so recommendation is to create it once and reuse rather than recreate a temporary every time you use it.
-
This post is deleted!
-
This warning is not about matching, it's about the regex object. Constructing it is expensive, so recommendation is to create it once and reuse rather than recreate a temporary every time you use it.
@Chris-Kawa That is fair, however adding such warning in raw code , before the code is compiled and not in common "warnings" seems overkill. It seems to be a trendy things for "code developers" to do - holding us poor coders hands....
Cheers
CLOSED -
@Chris-Kawa That is fair, however adding such warning in raw code , before the code is compiled and not in common "warnings" seems overkill. It seems to be a trendy things for "code developers" to do - holding us poor coders hands....
Cheers
CLOSED@AnneRanch said in QRegularExpression ?:
It seems to be a trendy things for "code developers" to do - holding us poor coders hands....
You can simply disable the clazy code warnings in QtCreator if you don't want them. But blaming others is much easier...
-
@Chris-Kawa That is fair, however adding such warning in raw code , before the code is compiled and not in common "warnings" seems overkill. It seems to be a trendy things for "code developers" to do - holding us poor coders hands....
Cheers
CLOSED@AnneRanch said:
holding us poor coders hands....
I mean... you did write that code so... maybe it's useful after all? ;)
In any case clazy is just another tool to help you write better code, like sanitizers, debuggers, static analyzers etc.
A lot of people find those useful. Like Christian said you can disable it if you feel you don't need it.