make && ctest
Details
Details
Diff Detail
Diff Detail
- Repository
- R246 Sonnet
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Actually, one can re-use this regex for all files by moving it before the scope of the loop, or?
The match on the other side is allocated per match() call, I would just move that inside the inner stuff and just do some
const auto match = rx....
Comment Actions
- Move the QRegularExpression definition out of the for loop, more efficient as it'll reused
- match() always allocates a QRegularExpressionMatch anyway, so move it inside the while loop
- Make the first () non-capturing since the capture group isn't needed