From 8e58815e721e093351a6e438a7a29ab1943a3253 Mon Sep 17 00:00:00 2001 From: Eunki Hong Date: Mon, 11 Sep 2023 19:22:26 +0900 Subject: [PATCH] Fix coverity issue on chipmunk-physics-debug - Uninitialized value for mDebugOptions - Unreached code line Change-Id: Ida0e45195346c6d5d83702f905f29ffce4dde526 Signed-off-by: Eunki Hong --- .../internal/chipmunk-impl/chipmunk-physics-debug-renderer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dali-physics/internal/chipmunk-impl/chipmunk-physics-debug-renderer.cpp b/dali-physics/internal/chipmunk-impl/chipmunk-physics-debug-renderer.cpp index 2e60d97..8331e14 100644 --- a/dali-physics/internal/chipmunk-impl/chipmunk-physics-debug-renderer.cpp +++ b/dali-physics/internal/chipmunk-impl/chipmunk-physics-debug-renderer.cpp @@ -163,6 +163,7 @@ PhysicsDebugRenderer::PhysicsDebugRenderer(uint32_t width, uint32_t height, Dali CP_SPACE_DEBUG_DRAW_CONSTRAINTS); mDebugDrawOptions.colorForShape = DebugDrawColorForShapeImpl; mDebugDrawOptions.shapeOutlineColor = cpSpaceDebugColor{0.0f, 1.0f, 1.0f, 0.9f}; + mDebugDrawOptions.constraintColor = cpSpaceDebugColor{0.5f, 0.5f, 0.5f, 0.9f}; mDebugDrawOptions.collisionPointColor = cpSpaceDebugColor{1.0f, 0.0f, 0.0f, 1.0f}; mDebugDrawOptions.data = this; } @@ -465,8 +466,6 @@ cpSpaceDebugColor PhysicsDebugRenderer::DrawColorForShape(cpShape* shape) return Colors[val & 0x7]; } } - - return cpSpaceDebugColor{1.0f, 1.0f, 1.0f, 1.0f}; } } // namespace Dali::Toolkit::Physics::Internal -- 2.7.4