summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-04-18 12:49:47 +0200
committerGitHub <noreply@github.com>2018-04-18 12:49:47 +0200
commit952f7d71aa2cbc9c2a0e3387de29345625cff818 (patch)
tree7bc213f699a86a2b5df8e864f3b7fab140829f53 /modules
parent3aaa5514d055ee4ad465b130109b351d0f05dd23 (diff)
parent2cfa86122294f6b5402bf9852171023be1fc15cb (diff)
Merge pull request #18142 from AndreaCatania/coverity1
Removed useless check
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/godot_result_callbacks.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp
index caa3d677dd..1bf259da84 100644
--- a/modules/bullet/godot_result_callbacks.cpp
+++ b/modules/bullet/godot_result_callbacks.cpp
@@ -172,10 +172,7 @@ btScalar GodotAllContactResultCallback::addSingleResult(btManifoldPoint &cp, con
result.shape = cp.m_index0;
}
- if (colObj)
- result.collider_id = colObj->get_instance_id();
- else
- result.collider_id = 0;
+ result.collider_id = colObj->get_instance_id();
result.collider = 0 == result.collider_id ? NULL : ObjectDB::get_instance(result.collider_id);
result.rid = colObj->get_self();
++m_count;
@@ -250,10 +247,7 @@ btScalar GodotRestInfoContactResultCallback::addSingleResult(btManifoldPoint &cp
m_rest_info_collision_object = colObj0Wrap->getCollisionObject();
}
- if (colObj)
- m_result->collider_id = colObj->get_instance_id();
- else
- m_result->collider_id = 0;
+ m_result->collider_id = colObj->get_instance_id();
m_result->rid = colObj->get_self();
m_collided = true;