From 26c6e246b74ce60cd64a0510d7988790a09dee55 Mon Sep 17 00:00:00 2001 From: Fredrik Hansson Date: Mon, 27 Aug 2018 21:33:02 +0200 Subject: [PATCH] changed the boolean logic for the assert for the size of nk_draw_index --- nuklear.h | 4 +--- src/nuklear_vertex.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/nuklear.h b/nuklear.h index 5a6ab18..05e8dbf 100644 --- a/nuklear.h +++ b/nuklear.h @@ -9370,10 +9370,8 @@ nk_draw_list_alloc_vertices(struct nk_draw_list *list, nk_size count) * backend (OpenGL, DirectX, ...). For example in OpenGL for `glDrawElements` * instead of specifing `GL_UNSIGNED_SHORT` you have to define `GL_UNSIGNED_INT`. * Sorry for the inconvenience. */ -#ifndef NK_UINT_DRAW_INDEX - NK_ASSERT((sizeof(nk_draw_index) == 2 && list->vertex_count < NK_USHORT_MAX && + if(sizeof(nk_draw_index)==2) NK_ASSERT((list->vertex_count < NK_USHORT_MAX && "To many verticies for 16-bit vertex indicies. Please read comment above on how to solve this problem")); -#endif return vtx; } NK_INTERN nk_draw_index* diff --git a/src/nuklear_vertex.c b/src/nuklear_vertex.c index dd4d0a9..8e94f88 100644 --- a/src/nuklear_vertex.c +++ b/src/nuklear_vertex.c @@ -233,10 +233,8 @@ nk_draw_list_alloc_vertices(struct nk_draw_list *list, nk_size count) * backend (OpenGL, DirectX, ...). For example in OpenGL for `glDrawElements` * instead of specifing `GL_UNSIGNED_SHORT` you have to define `GL_UNSIGNED_INT`. * Sorry for the inconvenience. */ -#ifndef NK_UINT_DRAW_INDEX - NK_ASSERT((sizeof(nk_draw_index) == 2 && list->vertex_count < NK_USHORT_MAX && + if(sizeof(nk_draw_index)==2) NK_ASSERT((list->vertex_count < NK_USHORT_MAX && "To many verticies for 16-bit vertex indicies. Please read comment above on how to solve this problem")); -#endif return vtx; } NK_INTERN nk_draw_index*