Skip to content

Commit

Permalink
use memset macros instead of fn in x11 demos
Browse files Browse the repository at this point in the history
  • Loading branch information
Hejsil committed Aug 16, 2019
1 parent 8cd2767 commit f176f3d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demo/x11/nuklear_xlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ nk_xlib_shutdown(void)
nk_xsurf_del(xlib.surf);
nk_free(&xlib.ctx);
XFreeCursor(xlib.dpy, xlib.cursor);
nk_memset(&xlib, 0, sizeof(xlib));
NK_MEMSET(&xlib, 0, sizeof(xlib));
}

NK_API void
Expand Down
4 changes: 2 additions & 2 deletions demo/x11_rawfb/nuklear_rawfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ nk_rawfb_init(void *fb, void *tex_mem, const unsigned int w, const unsigned int
if (!rawfb)
return NULL;

nk_memset(rawfb, 0, sizeof(struct rawfb_context));
NK_MEMSET(rawfb, 0, sizeof(struct rawfb_context));
rawfb->font_tex.pixels = tex_mem;
rawfb->font_tex.format = NK_FONT_ATLAS_ALPHA8;
rawfb->font_tex.w = rawfb->font_tex.h = 0;
Expand Down Expand Up @@ -1015,7 +1015,7 @@ nk_rawfb_shutdown(struct rawfb_context *rawfb)
{
if (rawfb) {
nk_free(&rawfb->ctx);
nk_memset(rawfb, 0, sizeof(struct rawfb_context));
NK_MEMSET(rawfb, 0, sizeof(struct rawfb_context));
free(rawfb);
}
}
Expand Down
2 changes: 1 addition & 1 deletion demo/x11_rawfb/nuklear_xlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ nk_xlib_shutdown(void)
XDestroyImage(xlib.ximg);
shmdt(xlib.xsi.shmaddr);
shmctl(xlib.xsi.shmid, IPC_RMID, NULL);
} nk_memset(&xlib, 0, sizeof(xlib));
} NK_MEMSET(&xlib, 0, sizeof(xlib));
}

NK_API void
Expand Down
2 changes: 1 addition & 1 deletion demo/x11_xft/nuklear_xlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ nk_xlib_shutdown(void)
nk_xsurf_del(xlib.surf);
nk_free(&xlib.ctx);
XFreeCursor(xlib.dpy, xlib.cursor);
nk_memset(&xlib, 0, sizeof(xlib));
NK_MEMSET(&xlib, 0, sizeof(xlib));
}

NK_API void
Expand Down

0 comments on commit f176f3d

Please sign in to comment.