summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2017-07-04 11:36:34 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-07-08 11:49:55 +0000
commit9db09b47000301bc3589278b076abdc111276304 (patch)
tree01dbdb4db4dc72b69d0efd0db650906cf97b9274 /src/corelib/global/qglobal.h
parent2300629df599938d67c13ed134e788db0fe8b21a (diff)
Fix modernize-use-bool-literals issues
Reported by clang-tidy. Skipped fixes in implementation files, only changed headers. Change-Id: I5cfd266b3d4046f90baebc0c538b1b6ab03a02d2 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 0c74ed4a3e..6023cc8564 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -339,10 +339,10 @@ typedef double qreal;
#define Q_INIT_RESOURCE(name) \
do { extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); \
- QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (0)
+ QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (false)
#define Q_CLEANUP_RESOURCE(name) \
do { extern int QT_MANGLE_NAMESPACE(qCleanupResources_ ## name) (); \
- QT_MANGLE_NAMESPACE(qCleanupResources_ ## name) (); } while (0)
+ QT_MANGLE_NAMESPACE(qCleanupResources_ ## name) (); } while (false)
/*
* If we're compiling C++ code:
@@ -646,7 +646,7 @@ inline void qt_noop(void) {}
# define QT_CATCH(A) else
# define QT_THROW(A) qt_noop()
# define QT_RETHROW qt_noop()
-# define QT_TERMINATE_ON_EXCEPTION(expr) do { expr; } while (0)
+# define QT_TERMINATE_ON_EXCEPTION(expr) do { expr; } while (false)
#else
# define QT_TRY try
# define QT_CATCH(A) catch (A)
@@ -654,9 +654,9 @@ inline void qt_noop(void) {}
# define QT_RETHROW throw
Q_NORETURN Q_CORE_EXPORT void qTerminate() Q_DECL_NOTHROW;
# ifdef Q_COMPILER_NOEXCEPT
-# define QT_TERMINATE_ON_EXCEPTION(expr) do { expr; } while (0)
+# define QT_TERMINATE_ON_EXCEPTION(expr) do { expr; } while (false)
# else
-# define QT_TERMINATE_ON_EXCEPTION(expr) do { try { expr; } catch (...) { qTerminate(); } } while (0)
+# define QT_TERMINATE_ON_EXCEPTION(expr) do { try { expr; } catch (...) { qTerminate(); } } while (false)
# endif
#endif
@@ -760,10 +760,10 @@ Q_CORE_EXPORT void qBadAlloc();
# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
# define Q_CHECK_PTR(p) qt_noop()
# else
-# define Q_CHECK_PTR(p) do {if(!(p))qt_check_pointer(__FILE__,__LINE__);} while (0)
+# define Q_CHECK_PTR(p) do {if (!(p)) qt_check_pointer(__FILE__,__LINE__);} while (false)
# endif
#else
-# define Q_CHECK_PTR(p) do { if (!(p)) qBadAlloc(); } while (0)
+# define Q_CHECK_PTR(p) do { if (!(p)) qBadAlloc(); } while (false)
#endif
template <typename T>