summaryrefslogtreecommitdiffstats
path: root/src/opengl/qopengldebug.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-08-26 11:16:27 +0200
committerMarc Mutz <marc.mutz@qt.io>2024-08-27 00:41:55 +0000
commit832e47ca44d3af1b7a3f722bad2a1d0c6fd56b5f (patch)
treefc9da6eb2232d4595c4e28da1a03372daa2bd3df /src/opengl/qopengldebug.cpp
parent09681d46f4cd17b2e78c93ff7da9e030f0ce6e0e (diff)
Give some TLC to FunctorCallBase::call_internal()
The function takes `fn` by universal reference, so it should be `std::forward`ing `fn` before calling it. This includes the unevaluated contexts, so use `std::is_nothrow_invocable_v` and `std::invoke_result_t` instead of `noexcept(fn())` and `decltype(fn())`. The std traits take the value category into account automatically. Linters like to warn about universal/forwarding references without std::forward(), so this should be fixed even without and actual overloaded op() &/op() && present. The function passed as `fn` may also be marked as `[[nodiscard]]`, so make sure that we never ignore the return value (unless it's void) to avoid throwing warnings. As a drive-by, replace Q_UNUSED with [[maybe_unused]] and inline the SlotRet type alias into its only user. Amends f894f04c9d03878116de61c11d4591da67c10378. Pick-to: 6.8 Change-Id: I5e045fc735f461a82244d7e80f81c2a9b1e69046 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/opengl/qopengldebug.cpp')
0 files changed, 0 insertions, 0 deletions