From 6a75e0d2d4452bed3bfe6dbe35f84af9acebff76 Mon Sep 17 00:00:00 2001 From: Renan <6718144+renancaraujo@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:06:50 +0000 Subject: [PATCH] refactor: remove dead code (#97) --- packages/forge2d/lib/src/collision/distance.dart | 2 -- packages/forge2d/lib/src/collision/time_of_impact.dart | 8 -------- packages/forge2d/lib/src/dynamics/fixture.dart | 2 -- 3 files changed, 12 deletions(-) diff --git a/packages/forge2d/lib/src/collision/distance.dart b/packages/forge2d/lib/src/collision/distance.dart index 9bbda36..8b5bbdd 100644 --- a/packages/forge2d/lib/src/collision/distance.dart +++ b/packages/forge2d/lib/src/collision/distance.dart @@ -501,8 +501,6 @@ class DistanceProxy { _count = 2; radius = edge.radius; break; - default: - assert(false); } } diff --git a/packages/forge2d/lib/src/collision/time_of_impact.dart b/packages/forge2d/lib/src/collision/time_of_impact.dart index dd85b32..d2f2105 100644 --- a/packages/forge2d/lib/src/collision/time_of_impact.dart +++ b/packages/forge2d/lib/src/collision/time_of_impact.dart @@ -411,11 +411,6 @@ class SeparationFunction { _pointA.setFrom(Transform.mulVec2(_xfa, _localPointA)); return (_pointA..sub(_pointB)).dot(_normal); - default: - assert(false); - indexes[0] = -1; - indexes[1] = -1; - return 0.0; } } @@ -447,9 +442,6 @@ class SeparationFunction { _pointA.setFrom(Transform.mulVec2(_xfa, _localPointA)); return (_pointA..sub(_pointB)).dot(_normal); - default: - assert(false); - return 0.0; } } } diff --git a/packages/forge2d/lib/src/dynamics/fixture.dart b/packages/forge2d/lib/src/dynamics/fixture.dart index 3df380d..902fe84 100644 --- a/packages/forge2d/lib/src/dynamics/fixture.dart +++ b/packages/forge2d/lib/src/dynamics/fixture.dart @@ -321,8 +321,6 @@ class Fixture { } } break; - default: - break; } } }