From 72ab65277b0050635bfcde0b7ff471358e563659 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 20 May 2019 16:37:44 +0200 Subject: [PATCH] Avoid some warnings --- src/physac.h | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/physac.h b/src/physac.h index 374aa4bc5..42cb01984 100644 --- a/src/physac.h +++ b/src/physac.h @@ -323,8 +323,6 @@ static void InitTimer(void); static uint64_t GetTimeCount(void); // Get hi-res MONOTONIC time measure in mseconds static double GetCurrentTime(void); // Get current time measure in milliseconds -static int GetRandomNumber(int min, int max); // Returns a random number between min and max (both included) - // Math functions static Vector2 MathCross(float value, Vector2 vector); // Returns the cross product of a vector and a value static float MathCrossVector2(Vector2 v1, Vector2 v2); // Returns the cross product of two vectors @@ -1771,7 +1769,7 @@ static float FindAxisLeastPenetration(int *faceIndex, PhysicsShape shapeA, Physi int bestIndex = 0; PolygonData dataA = shapeA.vertexData; - PolygonData dataB = shapeB.vertexData; + //PolygonData dataB = shapeB.vertexData; for (int i = 0; i < dataA.vertexCount; i++) { @@ -1921,7 +1919,7 @@ static void InitTimer(void) // Get hi-res MONOTONIC time measure in seconds static uint64_t GetTimeCount(void) { - uint64_t value; + uint64_t value = 0; #if defined(_WIN32) QueryPerformanceCounter((unsigned long long int *) &value); @@ -1946,19 +1944,6 @@ static double GetCurrentTime(void) return (double)(GetTimeCount() - baseTime)/frequency*1000; } -// Returns a random number between min and max (both included) -static int GetRandomNumber(int min, int max) -{ - if (min > max) - { - int tmp = max; - max = min; - min = tmp; - } - - return (rand()%(abs(max - min) + 1) + min); -} - // Returns the cross product of a vector and a value static inline Vector2 MathCross(float value, Vector2 vector) {