Commit a9c14ab
committed
PERF: Don't create temporary QRegularExpression
warning: Don't create temporary QRegularExpression objects. Use a
static QRegularExpression object instead [-Wclazy-use-static-qregularexpression]
Is alerting that the same QRegularExpression object is re-created
every time a function is called or expression is evaluated. This is
inefficient, especially for repeated use, because QRegularExpression has
a non-trivial construction cost (it compiles the regex pattern).
auto match = re.match(content);1 parent f1df0ec commit a9c14ab
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
0 commit comments