6da9662143
Coverity complained about the call to warnNullCallable() being dead code for most instantiations of the create() function template. It's right, of course, even though warning in a template that clearly has instantations where it's not dead code isn't exactly helpful. Nonetheless, take the opportinity to avoid the dead code warning at the expense of a bit or un-DRY-ing: - because we now use them more than once, cache the result of is_*function_* predicates in constexpr variables - then scope the is_null variable such that its use is not subject to dead-code removal anymore (at instantiation time; it may still be removed by the optimizer) As drive-bys, add a comment about the reinterpret_cast, and make the custom template predicates variable- instead of class templates. Coverity-Id: 407640 Change-Id: I272223042c2aae9d814e82c466e1d29e1c42bfa1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |