diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2014-10-30 22:30:01 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-10-31 15:42:42 +0100 |
commit | 0704d2be63b484cb579c1507223db3f914b1338a (patch) | |
tree | 66d4e616545d7f576125e85cc108c7e2988cecdd /src/qml/jsruntime/qv4arraydata_p.h | |
parent | e67948823d6810c2de784859da52a261bf80b550 (diff) |
Get rid of !this and similar constructs
The C++ standard doesn't allow calling member functions
on a mull object. Fix all such places, by moving the checks
to the caller where required.
Change-Id: I10fb22acaf0324d8ffd3a6d8e19152e5d32f56bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4arraydata_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4arraydata_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4arraydata_p.h b/src/qml/jsruntime/qv4arraydata_p.h index c2deb3e385..b69d200665 100644 --- a/src/qml/jsruntime/qv4arraydata_p.h +++ b/src/qml/jsruntime/qv4arraydata_p.h @@ -113,14 +113,14 @@ struct Q_QML_EXPORT ArrayData : public Managed Value *arrayData() { return &d()->arrayData[0]; } const ArrayVTable *vtable() const { return reinterpret_cast<const ArrayVTable *>(internalClass()->vtable); } - bool isSparse() const { return this && type() == Sparse; } + bool isSparse() const { return type() == Sparse; } uint length() const { return vtable()->length(this); } bool hasAttributes() const { - return this && attrs(); + return attrs(); } PropertyAttributes attributes(int i) const { Q_ASSERT(this); |