Change the unreacheable return value of shape_find_owner()

Update collision_object_3d.cpp

2d modified and UINT32 usage

Proper uINT32max usage

Change the unreacheable return value of shape_find_owner()

This reverts commit 5be98b81428169ba2dd5baecd00f1adfd9260e5c, reversing
changes made to efa3ff6b95.

Change the unreacheable return value of shape_find_owner()

changed from 0 to uint32_max"

This reverts commit c143bb099af2666454f82428a57f2721af60a84d.

Revert "changed from 0 to uint32_max""

This reverts commit 59e94edb9a32edff15f3cb881e6fc394d2aa7f65.

Revert "changed from 0 to uint32_max"

This reverts commit c143bb099af2666454f82428a57f2721af60a84d.

Revert "Revert "changed from 0 to uint32_max"""

This reverts commit c81d1073ec21b4cde4684a6dbd595f3359283bad.

Revert "changed from 0 to uint32_max"

This reverts commit c143bb099af2666454f82428a57f2721af60a84d.

Revert "changed from 0 to uint32_max""

This reverts commit 59e94edb9a32edff15f3cb881e6fc394d2aa7f65.

Revert "Revert "changed from 0 to uint32_max"""

This reverts commit 6dbd972aa5c4580d4f6270ead6c66eea18617f29.

Revert "changed from 0 to uint32_max""

This reverts commit 59e94edb9a32edff15f3cb881e6fc394d2aa7f65.

Revert "Revert "changed from 0 to uint32_max"""

This reverts commit b769ac2d11ad12f02a388d9dad17519f81d9c3b6.

Revert "Revert "Revert "changed from 0 to uint32_max""""

This reverts commit 1e8d84f7ec12da01c3153e08bb8609cf2c6fd58a.

Revert "Revert "Revert "Revert "changed from 0 to uint32_max"""""

This reverts commit 0dc17abefad6d540c18bba7b4df9d8c04e090d0c.

Change the unreacheable return value of shape_find_owner()
This commit is contained in:
Kemikal1 2021-10-19 16:40:07 +03:00
parent 9c9ec63e1d
commit 563d3dbf94
2 changed files with 4 additions and 4 deletions

View file

@ -454,7 +454,7 @@ void CollisionObject2D::shape_owner_clear_shapes(uint32_t p_owner) {
}
uint32_t CollisionObject2D::shape_find_owner(int p_shape_index) const {
ERR_FAIL_INDEX_V(p_shape_index, total_subshapes, 0);
ERR_FAIL_INDEX_V(p_shape_index, total_subshapes, UINT32_MAX);
for (const KeyValue<uint32_t, ShapeData> &E : shapes) {
for (int i = 0; i < E.value.shapes.size(); i++) {
@ -465,7 +465,7 @@ uint32_t CollisionObject2D::shape_find_owner(int p_shape_index) const {
}
//in theory it should be unreachable
return 0;
ERR_FAIL_V_MSG(UINT32_MAX, "Can't find owner for shape index " + itos(p_shape_index) + ".");
}
void CollisionObject2D::set_pickable(bool p_enabled) {

View file

@ -648,7 +648,7 @@ void CollisionObject3D::shape_owner_clear_shapes(uint32_t p_owner) {
}
uint32_t CollisionObject3D::shape_find_owner(int p_shape_index) const {
ERR_FAIL_INDEX_V(p_shape_index, total_subshapes, 0);
ERR_FAIL_INDEX_V(p_shape_index, total_subshapes, UINT32_MAX);
for (const KeyValue<uint32_t, ShapeData> &E : shapes) {
for (int i = 0; i < E.value.shapes.size(); i++) {
@ -659,7 +659,7 @@ uint32_t CollisionObject3D::shape_find_owner(int p_shape_index) const {
}
//in theory it should be unreachable
return 0;
ERR_FAIL_V_MSG(UINT32_MAX, "Can't find owner for shape index " + itos(p_shape_index) + ".");
}
CollisionObject3D::CollisionObject3D(RID p_rid, bool p_area) {