aboutsummaryrefslogtreecommitdiffstats
path: root/configure.cmake
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-05-06 19:07:42 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-05-07 23:19:15 +0200
commiteff31bf486c2f6b9fcc43e526566cd381aad2d6f (patch)
tree718515f6b785be70afb9e9382859d38ee84f7cf5 /configure.cmake
parentaf50ec087e44a9102f4e66e7fed4385c108aced3 (diff)
QtDeclarative: replace qSwap with std::swap/member-swap where possible
qSwap() is a monster that looks for ADL overloads of swap() and also detects the noexcept of the wrapped swap() function, so it should only be used when the argument type is unknown. In the vast majority of cases, the type is known to be efficiently std::swap()able or to have a member-swap. Call either of these. For the common case of pointer types, circumvent the expensive trait checks on std::swap() by using our hand-rolled qt_ptr_swap() template, the advantage being that it can be unconditionally noexcept, removing all type traits instantiations. In QQmlPropertyCacheAliasCreator, replace the qSwap() with std::move(). Task-number: QTBUG-97601 Pick-to: 6.3 6.2 5.15 Change-Id: I8b78a3ad287ce8565ca258ff38261e4d2cf0be63 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'configure.cmake')
0 files changed, 0 insertions, 0 deletions