115b1eab86
The latter are locale-dependent, and while that doesn't produce wrong results here¹, it means they need to be out-of-line, whereas QtMiscUtils functions are inline constexpr. ¹ isdigit could give a false positive on non-US-ASCII-digits, I suppose. As a drive-by, rely on the QtMiscUtils::fromHex() returning a negative value when a non-hex character was encountered, to avoid the extra isxdigit() checks. This property is preserved through the bit manipulations: ORing together negative values yields a negative number iff either or both operands were negative (in two's complement, which Qt requires). The caller also checks the array bounds before calling, so the isxdigit() calls didn't act as an implicit bounds check (returning false if they encounter '\0'), either. Task-number: QTBUG-109235 Pick-to: 6.5 Change-Id: I4cd734468e223f1047a53afd264d077b28cb5f1d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> |
||
---|---|---|
.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 |