diff src/stb_image.c @ 2414:69a5af2eb1ea

Remove useless dmMemset().
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 13 Jan 2020 23:27:01 +0200
parents 40797bfd35bf
children 9807ae37ad69
line wrap: on
line diff
--- a/src/stb_image.c	Mon Jan 13 23:20:56 2020 +0200
+++ b/src/stb_image.c	Mon Jan 13 23:27:01 2020 +0200
@@ -1371,7 +1371,7 @@
    h->maxcode[j] = 0xffffffff;
 
    // build non-spec acceleration table; 255 is flag for not-accelerated
-   dmMemset(h->fast, 255, 1 << FAST_BITS);
+   memset(h->fast, 255, 1 << FAST_BITS);
    for (i=0; i < k; ++i) {
       int s = h->size[i];
       if (s <= FAST_BITS) {
@@ -1551,7 +1551,7 @@
    if (t < 0) return stbi__err("bad huffman code","Corrupt JPEG");
 
    // 0 all the ac values now so we can do it 32-bits at a time
-   dmMemset(data,0,64*sizeof(data[0]));
+   memset(data,0,64*sizeof(data[0]));
 
    diff = t ? stbi__extend_receive(j, t) : 0;
    dc = j->img_comp[b].dc_pred + diff;
@@ -1603,7 +1603,7 @@
 
    if (j->succ_high == 0) {
       // first scan for DC coefficient, must be first
-      dmMemset(data,0,64*sizeof(data[0])); // 0 all the ac values now
+      memset(data,0,64*sizeof(data[0])); // 0 all the ac values now
       t = stbi__jpeg_huff_decode(j, hdc);
       diff = t ? stbi__extend_receive(j, t) : 0;
 
@@ -4560,7 +4560,7 @@
    pixelCount = w*h;
 
    // Initialize the data to zero.
-   //dmMemset( out, 0, pixelCount * 4 );
+   //memset( out, 0, pixelCount * 4 );
 
    // Finally, the image data.
    if (compression) {
@@ -4843,7 +4843,7 @@
 
    // intermediate buffer is RGBA
    result = (Uint8 *) dmMalloc(x*y*4);
-   dmMemset(result, 0xff, x*y*4);
+   memset(result, 0xff, x*y*4);
 
    if (!stbi__pic_load_core(s,x,y,comp, result)) {
       dmFree(result);
@@ -5193,7 +5193,7 @@
 {
    Uint8 *u = 0;
    stbi__gif g;
-   dmMemset(&g, 0, sizeof(g));
+   memset(&g, 0, sizeof(g));
 
    u = stbi__gif_load_next(s, &g, comp, req_comp);
    if (u == (Uint8 *) s) u = 0;  // end of animated gif marker