diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-05-14 07:39:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 07:39:54 +0200 |
commit | dd2aba021cade88b6b029071edde634197a253cd (patch) | |
tree | 866aa827dd2b25339a670efa8c5408bef6138577 /scene/3d | |
parent | e036eb648b2437ef9a5a074df534a487465996b0 (diff) | |
parent | 7f72d6476b7bf5a248685e91a994ac4d73e50ff6 (diff) |
Merge pull request #18853 from YeldhamDev/gui_cppcheck_fixes
Fixed some warnings found with Cppcheck
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/vehicle_body.cpp | 5 | ||||
-rw-r--r-- | scene/3d/voxel_light_baker.cpp | 5 |
2 files changed, 1 insertions, 9 deletions
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index b72665aa2b..a239e7e871 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -672,13 +672,8 @@ void VehicleBody::_update_friction(PhysicsDirectBodyState *s) { m_forwardImpulse.resize(numWheel); m_sideImpulse.resize(numWheel); - int numWheelsOnGround = 0; - //collapse all those loops into one! for (int i = 0; i < wheels.size(); i++) { - VehicleWheel &wheelInfo = *wheels[i]; - if (wheelInfo.m_raycastInfo.m_isInContact) - numWheelsOnGround++; m_sideImpulse[i] = real_t(0.); m_forwardImpulse[i] = real_t(0.); } diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index 13700e0bd3..670df5cc7f 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -2316,13 +2316,10 @@ Ref<MultiMesh> VoxelLightBaker::create_debug_multimesh(DebugMode p_mode) { PoolVector<Vector3> vertices; PoolVector<Color> colors; - - int vtx_idx = 0; #define ADD_VTX(m_idx) \ ; \ vertices.push_back(face_points[m_idx]); \ - colors.push_back(Color(1, 1, 1, 1)); \ - vtx_idx++; + colors.push_back(Color(1, 1, 1, 1)); for (int i = 0; i < 6; i++) { |