Skip to content

Commit dc6136e

Browse files
committed
Review formatting for PR raysan5#1004
1 parent 75b0264 commit dc6136e

File tree

3 files changed

+17
-25
lines changed

3 files changed

+17
-25
lines changed

src/physac.h

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -842,17 +842,13 @@ PHYSACDEF void DestroyPhysicsBody(PhysicsBody body)
842842
}
843843
}
844844

845-
846-
if (index == -1){
847-
848-
#if defined(PHYSAC_DEBUG)
849-
printf("[PHYSAC] cannot find body id %i in pointers array\n", id);
850-
#endif
851-
852-
// prevent access to index -1
853-
return;
854-
}
855-
845+
if (index == -1)
846+
{
847+
#if defined(PHYSAC_DEBUG)
848+
printf("[PHYSAC] Not possible to find body id %i in pointers array\n", id);
849+
#endif
850+
return; // Prevent access to index -1
851+
}
856852

857853
// Free body allocated memory
858854
PHYSAC_FREE(body);
@@ -1257,16 +1253,13 @@ static void DestroyPhysicsManifold(PhysicsManifold manifold)
12571253
}
12581254
}
12591255

1260-
1261-
if (index == -1) {
1262-
#if defined(PHYSAC_DEBUG)
1263-
printf("[PHYSAC] cannot find manifold id %i in pointers array\n", id);
1264-
#endif
1265-
1266-
//prevent access to index -1
1267-
return;
1268-
}
1269-
1256+
if (index == -1)
1257+
{
1258+
#if defined(PHYSAC_DEBUG)
1259+
printf("[PHYSAC] Not possible to manifold id %i in pointers array\n", id);
1260+
#endif
1261+
return; // Prevent access to index -1
1262+
}
12701263

12711264
// Free manifold allocated memory
12721265
PHYSAC_FREE(manifold);

src/rlgl.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,10 +1887,9 @@ unsigned int rlLoadTexture(void *data, int width, int height, int format, int mi
18871887
#endif
18881888
#endif // GRAPHICS_API_OPENGL_11
18891889

1890-
if( data == NULL ){
1891-
//ups!
1890+
if (data == NULL)
1891+
{
18921892
TraceLog(LOG_WARNING, "Got asked to load texture from a NULL pointer!");
1893-
18941893
return id;
18951894
}
18961895

src/shapes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ static float EaseCubicInOut(float t, float b, float c, float d)
15241524
// Get texture to draw shapes (RAII)
15251525
static Texture2D GetShapesTexture(void)
15261526
{
1527-
if (texShapes.id == 0) //this variable is an unsigned int, will never be negative
1527+
if (texShapes.id == 0)
15281528
{
15291529
#if defined(SUPPORT_FONT_TEXTURE)
15301530
texShapes = GetFontDefault().texture; // Use font texture white character

0 commit comments

Comments
 (0)