Răsfoiți Sursa

Cleanup unused functions

Michaelangel007 10 ani în urmă
părinte
comite
c11532b872
1 a modificat fișierele cu 7 adăugiri și 1 ștergeri
  1. 7 1
      stb_image.h

+ 7 - 1
stb_image.h

@@ -989,6 +989,7 @@ static unsigned char *stbi__load_flip(stbi__context *s, int *x, int *y, int *com
    return result;
    return result;
 }
 }
 
 
+#ifndef STBI_NO_HDR
 static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp)
 static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp)
 {
 {
    if (stbi__vertically_flip_on_load && result != NULL) {
    if (stbi__vertically_flip_on_load && result != NULL) {
@@ -1009,7 +1010,7 @@ static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, in
       }
       }
    }
    }
 }
 }
-
+#endif
 
 
 #ifndef STBI_NO_STDIO
 #ifndef STBI_NO_STDIO
 
 
@@ -1288,17 +1289,22 @@ static stbi__uint32 stbi__get32be(stbi__context *s)
    return (z << 16) + stbi__get16be(s);
    return (z << 16) + stbi__get16be(s);
 }
 }
 
 
+#if defined (STBI_NO_BMP) && (STBI_NO_TGA) && (STBI_NO_GIF)
+#else
 static int stbi__get16le(stbi__context *s)
 static int stbi__get16le(stbi__context *s)
 {
 {
    int z = stbi__get8(s);
    int z = stbi__get8(s);
    return z + (stbi__get8(s) << 8);
    return z + (stbi__get8(s) << 8);
 }
 }
+#endif
 
 
+#ifndef STBI_NO_BMP
 static stbi__uint32 stbi__get32le(stbi__context *s)
 static stbi__uint32 stbi__get32le(stbi__context *s)
 {
 {
    stbi__uint32 z = stbi__get16le(s);
    stbi__uint32 z = stbi__get16le(s);
    return z + (stbi__get16le(s) << 16);
    return z + (stbi__get16le(s) << 16);
 }
 }
+#endif
 
 
 #define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
 #define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings