From 3204c9837ad7ee5b91d0b5c8bb56b3488d51f1d7 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Fri, 10 Feb 2023 15:04:15 +0200 Subject: [PATCH] QtMiscUtils: fix return type of two helpers, should be bool Pointed out by Oswald Buddenhagen. Change-Id: I3e38e0aee4555a1f37b8dbade38b6a0b3428f74c Reviewed-by: Thiago Macieira (cherry picked from commit 310f5e955f3a27fbcba6d30f3ad6b8f7c39c8788) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/tools/qtools_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qtools_p.h b/src/corelib/tools/qtools_p.h index 3f6b2d8b5a5..8969030b163 100644 --- a/src/corelib/tools/qtools_p.h +++ b/src/corelib/tools/qtools_p.h @@ -31,7 +31,7 @@ constexpr inline char toHexLower(uint value) noexcept return "0123456789abcdef"[value & 0xF]; } -[[nodiscard]] constexpr inline int isHexDigit(char32_t c) noexcept +[[nodiscard]] constexpr inline bool isHexDigit(char32_t c) noexcept { return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') @@ -51,7 +51,7 @@ constexpr inline char toOct(uint value) noexcept return char('0' + (value & 0x7)); } -[[nodiscard]] constexpr inline int isOctalDigit(char32_t c) noexcept +[[nodiscard]] constexpr inline bool isOctalDigit(char32_t c) noexcept { return c >= '0' && c <= '7'; }