diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2024-12-28 11:26:40 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2024-12-31 08:27:36 +0100 |
| commit | e57113feac183abd1f5bfcfb633a33e1387b2d3e (patch) | |
| tree | 95bfce6e90dad15f97322eee34432300d2c60502 /examples/sql/sqlbrowser/qsqlconnectiondialog.cpp | |
| parent | 8bf54385319df958ea88f9998e7690d4c35e354d (diff) | |
QLibraryInfo: de-pessimize prefixFromAppDirHelper()
The local appDir variable was only used to hold the return value of
another function call. But hardly any compiler will be able to look
through the QString atomic ref-counting to turn the non-Darwin code
paths into the tail-calls that they ought to be.
Remove the variable and return the result immediately. This removes
the move-assignment and dtor calls in the two changed lines and lets
RVO kick in, turning these calls into tail-calls on non-Darwin
platforms.
Amends 4ac872639ed0dd3ae6627e05bdda821f7d128500.
Pick-to: 6.9 6.8 6.5
Change-Id: Ieeefbd52fc983ab7aebcff6419965b206f374935
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'examples/sql/sqlbrowser/qsqlconnectiondialog.cpp')
0 files changed, 0 insertions, 0 deletions
