diff options
| author | Ray <raysan5@gmail.com> | 2019-10-29 16:03:21 +0100 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2019-10-29 16:03:21 +0100 |
| commit | dc6136e820a5793fb469e78154b57a46ac619139 (patch) | |
| tree | 0e1c8006738d0fad0584fac2d6157e9d9fb708a2 | |
| parent | 75b0264f35d8895c1e64c7c7bc85d1572d167cf2 (diff) | |
| download | raylib-dc6136e820a5793fb469e78154b57a46ac619139.tar.gz raylib-dc6136e820a5793fb469e78154b57a46ac619139.zip | |
Review formatting for PR #1004
| -rw-r--r-- | src/physac.h | 35 | ||||
| -rw-r--r-- | src/rlgl.h | 5 | ||||
| -rw-r--r-- | src/shapes.c | 2 |
3 files changed, 17 insertions, 25 deletions
diff --git a/src/physac.h b/src/physac.h index b23fb1af..ea7dcc58 100644 --- a/src/physac.h +++ b/src/physac.h @@ -842,17 +842,13 @@ PHYSACDEF void DestroyPhysicsBody(PhysicsBody body) } } - - if (index == -1){ - - #if defined(PHYSAC_DEBUG) - printf("[PHYSAC] cannot find body id %i in pointers array\n", id); - #endif - - // prevent access to index -1 - return; - } - + if (index == -1) + { + #if defined(PHYSAC_DEBUG) + printf("[PHYSAC] Not possible to find body id %i in pointers array\n", id); + #endif + return; // Prevent access to index -1 + } // Free body allocated memory PHYSAC_FREE(body); @@ -1257,16 +1253,13 @@ static void DestroyPhysicsManifold(PhysicsManifold manifold) } } - - if (index == -1) { - #if defined(PHYSAC_DEBUG) - printf("[PHYSAC] cannot find manifold id %i in pointers array\n", id); - #endif - - //prevent access to index -1 - return; - } - + if (index == -1) + { + #if defined(PHYSAC_DEBUG) + printf("[PHYSAC] Not possible to manifold id %i in pointers array\n", id); + #endif + return; // Prevent access to index -1 + } // Free manifold allocated memory PHYSAC_FREE(manifold); @@ -1887,10 +1887,9 @@ unsigned int rlLoadTexture(void *data, int width, int height, int format, int mi #endif #endif // GRAPHICS_API_OPENGL_11 - if( data == NULL ){ - //ups! + if (data == NULL) + { TraceLog(LOG_WARNING, "Got asked to load texture from a NULL pointer!"); - return id; } diff --git a/src/shapes.c b/src/shapes.c index fc0fb00c..5aef9739 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -1524,7 +1524,7 @@ static float EaseCubicInOut(float t, float b, float c, float d) // Get texture to draw shapes (RAII) static Texture2D GetShapesTexture(void) { - if (texShapes.id == 0) //this variable is an unsigned int, will never be negative + if (texShapes.id == 0) { #if defined(SUPPORT_FONT_TEXTURE) texShapes = GetFontDefault().texture; // Use font texture white character |
