diff options
| author | Thaer Razeq | 2017-02-23 02:28:09 -0600 |
|---|---|---|
| committer | REBELLIOUSX\Rebel_X | 2017-02-28 07:52:02 -0600 |
| commit | f50488a36188d5975bfa8554687a1acdd394d6a9 (patch) | |
| tree | 3b8712b9162aeb30e8eaaeeca63e6d04c7b9e3b5 /servers/physics/shape_sw.cpp | |
| parent | 0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff) | |
| download | godot-f50488a36188d5975bfa8554687a1acdd394d6a9.tar.gz godot-f50488a36188d5975bfa8554687a1acdd394d6a9.tar.zst godot-f50488a36188d5975bfa8554687a1acdd394d6a9.zip | |
Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs
- Remove some checks (always false: unsigned never < 0)
- Fix some if statements based on reviews.
- Bunch of missing `else` statements
Diffstat (limited to 'servers/physics/shape_sw.cpp')
| -rw-r--r-- | servers/physics/shape_sw.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp index 10500a306..dec1c75d9 100644 --- a/servers/physics/shape_sw.cpp +++ b/servers/physics/shape_sw.cpp @@ -181,7 +181,7 @@ void RayShapeSW::get_supports(const Vector3& p_normal,int p_max,Vector3 *r_suppo r_amount=2; r_supports[0]=Vector3(0,0,0); r_supports[1]=Vector3(0,0,length); - } if (p_normal.z>0) { + } else if (p_normal.z>0) { r_amount=1; *r_supports=Vector3(0,0,length); } else { |
