diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-09-05 00:14:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-05 00:14:35 +0200 |
commit | efa50fbdfdc3ba8cba745450743731190fd99323 (patch) | |
tree | 7641cb793e7034821592c02c1a3bec7c82a6989f /core | |
parent | 0f63b683365a59eac33cbfff9e04560a10cedc75 (diff) | |
parent | f8cb9f5516cd8081a8a887afdb459cb9d1ff7f16 (diff) |
Merge pull request #10975 from hpvb/remove-null-check-from-cast-to
Remove NULL check from Object::cast_to()
Diffstat (limited to 'core')
-rw-r--r-- | core/object.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/core/object.h b/core/object.h index 6e1ed4308e..644e2b8270 100644 --- a/core/object.h +++ b/core/object.h @@ -567,12 +567,6 @@ public: template <class T> static T *cast_to(Object *p_object) { -#ifdef DEBUG_ENABLED - // TODO there are some legitimate reasons to pass NULL as p_object. - // we need to figure out how to deal with that in debug mode. - // This code will return NULL for a NULL input in release mode also. - ERR_FAIL_COND_V(p_object == NULL, NULL); -#endif #ifndef NO_SAFE_CAST return dynamic_cast<T *>(p_object); #else @@ -587,12 +581,6 @@ public: template <class T> static const T *cast_to(const Object *p_object) { -#ifdef DEBUG_ENABLED - // TODO there are some legitimate reasons to pass NULL as p_object. - // we need to figure out how to deal with that in debug mode. - // This code will return NULL for a NULL input in release mode also. - ERR_FAIL_COND_V(p_object == NULL, NULL); -#endif #ifndef NO_SAFE_CAST return dynamic_cast<const T *>(p_object); #else |