Make public headers compile with -Wzero-as-null-pointer-constant
... or similar. This amends previous commits that converted the majority of cases. Task-number: QTBUG-45291 Change-Id: I219cdeddca7063a56efeb4fee0e5bb2cbdc7732b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
3f4eba746d
commit
13034e67c0
@ -144,7 +144,7 @@ template <typename X> struct QAtomicOps
|
||||
static inline Q_DECL_CONSTEXPR bool isTestAndSetWaitFree() Q_DECL_NOTHROW { return false; }
|
||||
|
||||
template <typename T>
|
||||
static bool testAndSetRelaxed(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
|
||||
static bool testAndSetRelaxed(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
|
||||
{
|
||||
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_relaxed);
|
||||
if (currentValue)
|
||||
@ -153,7 +153,7 @@ template <typename X> struct QAtomicOps
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static bool testAndSetAcquire(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
|
||||
static bool testAndSetAcquire(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
|
||||
{
|
||||
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acquire);
|
||||
if (currentValue)
|
||||
@ -162,7 +162,7 @@ template <typename X> struct QAtomicOps
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static bool testAndSetRelease(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
|
||||
static bool testAndSetRelease(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
|
||||
{
|
||||
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_release);
|
||||
if (currentValue)
|
||||
@ -171,7 +171,7 @@ template <typename X> struct QAtomicOps
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static bool testAndSetOrdered(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
|
||||
static bool testAndSetOrdered(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
|
||||
{
|
||||
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acq_rel);
|
||||
if (currentValue)
|
||||
|
@ -138,7 +138,7 @@ public:
|
||||
QImage(const QImage &);
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
inline QImage(QImage &&other) Q_DECL_NOEXCEPT
|
||||
: QPaintDevice(), d(0)
|
||||
: QPaintDevice(), d(Q_NULLPTR)
|
||||
{ qSwap(d, other.d); }
|
||||
#endif
|
||||
~QImage();
|
||||
|
@ -795,7 +795,7 @@ public:
|
||||
TouchPoint(const TouchPoint &other);
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
TouchPoint(TouchPoint &&other) Q_DECL_NOEXCEPT
|
||||
: d(0)
|
||||
: d(Q_NULLPTR)
|
||||
{ qSwap(d, other.d); }
|
||||
TouchPoint &operator=(TouchPoint &&other) Q_DECL_NOEXCEPT
|
||||
{ qSwap(d, other.d); return *this; }
|
||||
|
@ -404,7 +404,7 @@ public:
|
||||
void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
|
||||
|
||||
private:
|
||||
static bool isInitialized(const QOpenGLExtraFunctionsPrivate *d) { return d != 0; }
|
||||
static bool isInitialized(const QOpenGLExtraFunctionsPrivate *d) { return d != Q_NULLPTR; }
|
||||
};
|
||||
|
||||
class QOpenGLExtraFunctionsPrivate : public QOpenGLFunctionsPrivate
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
QPen &operator=(const QPen &pen) Q_DECL_NOTHROW;
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
QPen(QPen &&other) Q_DECL_NOTHROW
|
||||
: d(other.d) { other.d = 0; }
|
||||
: d(other.d) { other.d = Q_NULLPTR; }
|
||||
QPen &operator=(QPen &&other) Q_DECL_NOTHROW
|
||||
{ qSwap(d, other.d); return *this; }
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user