Review formatting for PR #1004
This commit is contained in:
parent
75b0264f35
commit
dc6136e820
3 changed files with 17 additions and 25 deletions
31
src/physac.h
31
src/physac.h
|
@ -842,18 +842,14 @@ PHYSACDEF void DestroyPhysicsBody(PhysicsBody body)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (index == -1)
|
||||||
if (index == -1){
|
{
|
||||||
|
#if defined(PHYSAC_DEBUG)
|
||||||
#if defined(PHYSAC_DEBUG)
|
printf("[PHYSAC] Not possible to find body id %i in pointers array\n", id);
|
||||||
printf("[PHYSAC] cannot find body id %i in pointers array\n", id);
|
#endif
|
||||||
#endif
|
return; // Prevent access to index -1
|
||||||
|
|
||||||
// prevent access to index -1
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Free body allocated memory
|
// Free body allocated memory
|
||||||
PHYSAC_FREE(body);
|
PHYSAC_FREE(body);
|
||||||
usedMemory -= sizeof(PhysicsBodyData);
|
usedMemory -= sizeof(PhysicsBodyData);
|
||||||
|
@ -1257,17 +1253,14 @@ static void DestroyPhysicsManifold(PhysicsManifold manifold)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (index == -1)
|
||||||
if (index == -1) {
|
{
|
||||||
#if defined(PHYSAC_DEBUG)
|
#if defined(PHYSAC_DEBUG)
|
||||||
printf("[PHYSAC] cannot find manifold id %i in pointers array\n", id);
|
printf("[PHYSAC] Not possible to manifold id %i in pointers array\n", id);
|
||||||
#endif
|
#endif
|
||||||
|
return; // Prevent access to index -1
|
||||||
//prevent access to index -1
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Free manifold allocated memory
|
// Free manifold allocated memory
|
||||||
PHYSAC_FREE(manifold);
|
PHYSAC_FREE(manifold);
|
||||||
usedMemory -= sizeof(PhysicsManifoldData);
|
usedMemory -= sizeof(PhysicsManifoldData);
|
||||||
|
|
|
@ -1887,10 +1887,9 @@ unsigned int rlLoadTexture(void *data, int width, int height, int format, int mi
|
||||||
#endif
|
#endif
|
||||||
#endif // GRAPHICS_API_OPENGL_11
|
#endif // GRAPHICS_API_OPENGL_11
|
||||||
|
|
||||||
if( data == NULL ){
|
if (data == NULL)
|
||||||
//ups!
|
{
|
||||||
TraceLog(LOG_WARNING, "Got asked to load texture from a NULL pointer!");
|
TraceLog(LOG_WARNING, "Got asked to load texture from a NULL pointer!");
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1524,7 +1524,7 @@ static float EaseCubicInOut(float t, float b, float c, float d)
|
||||||
// Get texture to draw shapes (RAII)
|
// Get texture to draw shapes (RAII)
|
||||||
static Texture2D GetShapesTexture(void)
|
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)
|
#if defined(SUPPORT_FONT_TEXTURE)
|
||||||
texShapes = GetFontDefault().texture; // Use font texture white character
|
texShapes = GetFontDefault().texture; // Use font texture white character
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue