Browse Source

Sonar issue fixes

Jorrit Rouwe 9 months ago
parent
commit
fb36cec7ee
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Jolt/Math/Vector.h
  2. 1 1
      Jolt/Physics/Collision/Shape/Shape.cpp

+ 1 - 1
Jolt/Math/Vector.h

@@ -75,7 +75,7 @@ public:
 	}
 
 	/// Test if two vectors are close to each other
-	inline bool					IsClose(const Vector &inV2, float inMaxDistSq = 1.0e-12f)
+	inline bool					IsClose(const Vector &inV2, float inMaxDistSq = 1.0e-12f) const
 	{
 		return (inV2 - *this).LengthSq() <= inMaxDistSq;
 	}

+ 1 - 1
Jolt/Physics/Collision/Shape/Shape.cpp

@@ -113,7 +113,7 @@ void Shape::SaveWithChildren(StreamOut &inStream, ShapeToIDMap &ioShapeMap, Mate
 	if (shape_id_iter == ioShapeMap.end())
 	{
 		// Write shape ID of this shape
-		uint32 shape_id = (uint32)ioShapeMap.size();
+		uint32 shape_id = ioShapeMap.size();
 		ioShapeMap[this] = shape_id;
 		inStream.Write(shape_id);