diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-26 13:13:56 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-27 18:34:30 +0200 |
| commit | 7b081a7fc8011c5ce7194fc0eabb8768e0f9d4c6 (patch) | |
| tree | bff9c5d115f0ad90f6529d8578d71a04d7457248 /modules/bullet/hinge_joint_bullet.cpp | |
| parent | 4cf5bb027678717263476e676cd23f881eef1ca1 (diff) | |
| download | redot-engine-7b081a7fc8011c5ce7194fc0eabb8768e0f9d4c6.tar.gz | |
Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form:
core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch]
core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch]
Those can be trivial cases where adding a default fallback is the solution,
or more complex issues/hidden bugs where missed values are actually meant
to be handled.
Diffstat (limited to 'modules/bullet/hinge_joint_bullet.cpp')
| -rw-r--r-- | modules/bullet/hinge_joint_bullet.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/bullet/hinge_joint_bullet.cpp b/modules/bullet/hinge_joint_bullet.cpp index 86c6a632cd..3a4459a581 100644 --- a/modules/bullet/hinge_joint_bullet.cpp +++ b/modules/bullet/hinge_joint_bullet.cpp @@ -117,7 +117,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t hingeConstraint->setMaxMotorImpulse(p_value); break; default: - ERR_EXPLAIN("This parameter " + itos(p_param) + " is deprecated"); + ERR_EXPLAIN("The HingeJoint parameter " + itos(p_param) + " is deprecated."); WARN_DEPRECATED break; } @@ -143,7 +143,7 @@ real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE: return hingeConstraint->getMaxMotorImpulse(); default: - ERR_EXPLAIN("This parameter " + itos(p_param) + " is deprecated"); + ERR_EXPLAIN("The HingeJoint parameter " + itos(p_param) + " is deprecated."); WARN_DEPRECATED; return 0; } @@ -159,6 +159,7 @@ void HingeJointBullet::set_flag(PhysicsServer::HingeJointFlag p_flag, bool p_val case PhysicsServer::HINGE_JOINT_FLAG_ENABLE_MOTOR: hingeConstraint->enableMotor(p_value); break; + case PhysicsServer::HINGE_JOINT_FLAG_MAX: break; // Can't happen, but silences warning } } |
