From 64de057ebe8c4a2a0ee1ede834a67508cd4f81b1 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 4 Feb 2022 00:59:58 +0100 Subject: [PATCH] QLibraryInfo: mark isDebugBuild() noexcept and CONST It's literally return true; // or return false; so it can be marked as noexcept and (the stronger form of) pure. Change-Id: Id55fee1db5d18201be2ea6c6778ece3de68b05f2 Reviewed-by: Thiago Macieira --- src/corelib/global/qlibraryinfo.cpp | 2 +- src/corelib/global/qlibraryinfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 0ae41cc48e..dc19ec0b98 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -291,7 +291,7 @@ const char *QLibraryInfo::build() noexcept false if it was built in release mode. */ bool -QLibraryInfo::isDebugBuild() +QLibraryInfo::isDebugBuild() noexcept { #ifdef QT_DEBUG return true; diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h index a7d44768c8..6753bf9121 100644 --- a/src/corelib/global/qlibraryinfo.h +++ b/src/corelib/global/qlibraryinfo.h @@ -51,7 +51,7 @@ class Q_CORE_EXPORT QLibraryInfo public: static const char *build() noexcept; - static bool isDebugBuild(); + static bool isDebugBuild() noexcept Q_DECL_CONST_FUNCTION; #ifndef QT_BOOTSTRAPPED static QVersionNumber version() noexcept Q_DECL_CONST_FUNCTION;