Skip to content

Commit

Permalink
changed the boolean logic for the assert for the size of nk_draw_index
Browse files Browse the repository at this point in the history
  • Loading branch information
FredrikHson committed Aug 27, 2018
1 parent 2b03f44 commit 26c6e24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
4 changes: 1 addition & 3 deletions src/nuklear_vertex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down

0 comments on commit 26c6e24

Please sign in to comment.