Merge pull request #68861 from asmaloney/remove-break-after-return

Static analysis: remove "break" after "return"
This commit is contained in:
Rémi Verschelde 2022-11-20 11:43:50 +01:00
commit 5ba216e428
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 10 additions and 10 deletions

View file

@ -487,7 +487,7 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
euler.z = 0.0f; euler.z = 0.0f;
} }
return euler; return euler;
} break; }
case EulerOrder::XZY: { case EulerOrder::XZY: {
// Euler angles in XZY convention. // Euler angles in XZY convention.
// See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix
@ -516,7 +516,7 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
euler.z = -Math_PI / 2.0f; euler.z = -Math_PI / 2.0f;
} }
return euler; return euler;
} break; }
case EulerOrder::YXZ: { case EulerOrder::YXZ: {
// Euler angles in YXZ convention. // Euler angles in YXZ convention.
// See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix
@ -554,7 +554,7 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
} }
return euler; return euler;
} break; }
case EulerOrder::YZX: { case EulerOrder::YZX: {
// Euler angles in YZX convention. // Euler angles in YZX convention.
// See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix // See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix
@ -639,7 +639,7 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
euler.z = -Math::atan2(rows[0][1], rows[1][1]); euler.z = -Math::atan2(rows[0][1], rows[1][1]);
} }
return euler; return euler;
} break; }
default: { default: {
ERR_FAIL_V_MSG(Vector3(), "Invalid parameter for get_euler(order)"); ERR_FAIL_V_MSG(Vector3(), "Invalid parameter for get_euler(order)");
} }

View file

@ -181,7 +181,7 @@ Plane Projection::get_projection_plane(Planes p_plane) const {
new_plane.normal = -new_plane.normal; new_plane.normal = -new_plane.normal;
new_plane.normalize(); new_plane.normalize();
return new_plane; return new_plane;
} break; }
case PLANE_FAR: { case PLANE_FAR: {
Plane new_plane = Plane(matrix[3] - matrix[2], Plane new_plane = Plane(matrix[3] - matrix[2],
matrix[7] - matrix[6], matrix[7] - matrix[6],
@ -191,7 +191,7 @@ Plane Projection::get_projection_plane(Planes p_plane) const {
new_plane.normal = -new_plane.normal; new_plane.normal = -new_plane.normal;
new_plane.normalize(); new_plane.normalize();
return new_plane; return new_plane;
} break; }
case PLANE_LEFT: { case PLANE_LEFT: {
Plane new_plane = Plane(matrix[3] + matrix[0], Plane new_plane = Plane(matrix[3] + matrix[0],
matrix[7] + matrix[4], matrix[7] + matrix[4],
@ -201,7 +201,7 @@ Plane Projection::get_projection_plane(Planes p_plane) const {
new_plane.normal = -new_plane.normal; new_plane.normal = -new_plane.normal;
new_plane.normalize(); new_plane.normalize();
return new_plane; return new_plane;
} break; }
case PLANE_TOP: { case PLANE_TOP: {
Plane new_plane = Plane(matrix[3] - matrix[1], Plane new_plane = Plane(matrix[3] - matrix[1],
matrix[7] - matrix[5], matrix[7] - matrix[5],
@ -211,7 +211,7 @@ Plane Projection::get_projection_plane(Planes p_plane) const {
new_plane.normal = -new_plane.normal; new_plane.normal = -new_plane.normal;
new_plane.normalize(); new_plane.normalize();
return new_plane; return new_plane;
} break; }
case PLANE_RIGHT: { case PLANE_RIGHT: {
Plane new_plane = Plane(matrix[3] - matrix[0], Plane new_plane = Plane(matrix[3] - matrix[0],
matrix[7] - matrix[4], matrix[7] - matrix[4],
@ -221,7 +221,7 @@ Plane Projection::get_projection_plane(Planes p_plane) const {
new_plane.normal = -new_plane.normal; new_plane.normal = -new_plane.normal;
new_plane.normalize(); new_plane.normalize();
return new_plane; return new_plane;
} break; }
case PLANE_BOTTOM: { case PLANE_BOTTOM: {
Plane new_plane = Plane(matrix[3] + matrix[1], Plane new_plane = Plane(matrix[3] + matrix[1],
matrix[7] + matrix[5], matrix[7] + matrix[5],
@ -231,7 +231,7 @@ Plane Projection::get_projection_plane(Planes p_plane) const {
new_plane.normal = -new_plane.normal; new_plane.normal = -new_plane.normal;
new_plane.normalize(); new_plane.normalize();
return new_plane; return new_plane;
} break; }
} }
return Plane(); return Plane();