diff options
Diffstat (limited to 'include/JSystem/JSupport')
| -rw-r--r-- | include/JSystem/JSupport/JSUList.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JSupport/JSupport.h | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/include/JSystem/JSupport/JSUList.h b/include/JSystem/JSupport/JSUList.h index 7b31430276..8d42762d2c 100644 --- a/include/JSystem/JSupport/JSUList.h +++ b/include/JSystem/JSupport/JSUList.h @@ -245,9 +245,9 @@ public: return *this; } - T* operator*() const { return this->getObject(); } + T* operator*() const { return mTree->getObject(); } - T* operator->() const { return this->getObject(); } + T* operator->() const { return mTree->getObject(); } private: JSUTree<T>* mTree; diff --git a/include/JSystem/JSupport/JSupport.h b/include/JSystem/JSupport/JSupport.h index 4f103bdf1a..717fd9b7b0 100644 --- a/include/JSystem/JSupport/JSupport.h +++ b/include/JSystem/JSupport/JSupport.h @@ -10,11 +10,7 @@ */ template <typename T> T* JSUConvertOffsetToPtr(const void* ptr, uintptr_t offset) { - if (offset == 0) { - return NULL; - } else { - return (T*)((intptr_t)ptr + (intptr_t)offset); - } + return offset == 0 ? NULL : (T*)((intptr_t)ptr + (intptr_t)offset); } /** |
