Browse Source

sonar: Removed a reinterpret_cast

Jorrit Rouwe 3 years ago
parent
commit
eeda6f0b13
2 changed files with 2 additions and 7 deletions
  1. 1 6
      Jolt/Geometry/EPAConvexHullBuilder.h
  2. 1 1
      Jolt/Geometry/EPAPenetrationDepth.h

+ 1 - 6
Jolt/Geometry/EPAConvexHullBuilder.h

@@ -166,15 +166,10 @@ public:
 	using PointsBase = StaticArray<Vec3, cMaxPoints>;
 	using PointsBase = StaticArray<Vec3, cMaxPoints>;
 	using Triangles = StaticArray<Triangle *, cMaxTriangles>;
 	using Triangles = StaticArray<Triangle *, cMaxTriangles>;
 
 
-	/// Specialized points list that allows direct access to the size and pointer
+	/// Specialized points list that allows direct access to the size
 	class Points : public PointsBase
 	class Points : public PointsBase
 	{
 	{
 	public:
 	public:
-		Vec3 *			GetElementPtr()
-		{
-			return reinterpret_cast<Vec3 *>(mElements);
-		}
-
 		size_type &		GetSizeRef()
 		size_type &		GetSizeRef()
 		{
 		{
 			return mSize;
 			return mSize;

+ 1 - 1
Jolt/Geometry/EPAPenetrationDepth.h

@@ -143,7 +143,7 @@ public:
 
 
 		// Fetch the simplex from GJK algorithm
 		// Fetch the simplex from GJK algorithm
 		SupportPoints support_points;
 		SupportPoints support_points;
-		mGJK.GetClosestPointsSimplex(support_points.mY.GetElementPtr(), support_points.mP, support_points.mQ, support_points.mY.GetSizeRef());
+		mGJK.GetClosestPointsSimplex(support_points.mY.data(), support_points.mP, support_points.mQ, support_points.mY.GetSizeRef());
 
 
 		// Fill up the amount of support points to 4
 		// Fill up the amount of support points to 4
 		switch (support_points.mY.size())
 		switch (support_points.mY.size())