Skip to content

Commit

Permalink
Merge pull request #662 from bolt-blue/indentation_quickfix
Browse files Browse the repository at this point in the history
Improve one poor case of indentation
  • Loading branch information
RobLoach authored Jul 20, 2024
2 parents 0319c0f + a689b8e commit 8f3fc31
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 9 additions & 7 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -9694,14 +9694,16 @@ nk_draw_list_push_image(struct nk_draw_list *list, nk_handle texture)
struct nk_draw_command *prev = nk_draw_list_command_last(list);
if (prev->elem_count == 0) {
prev->texture = texture;
#ifdef NK_INCLUDE_COMMAND_USERDATA
#ifdef NK_INCLUDE_COMMAND_USERDATA
prev->userdata = list->userdata;
#endif
} else if (prev->texture.id != texture.id
#ifdef NK_INCLUDE_COMMAND_USERDATA
|| prev->userdata.id != list->userdata.id
#endif
) nk_draw_list_push_command(list, prev->clip_rect, texture);
#endif
} else if (prev->texture.id != texture.id
#ifdef NK_INCLUDE_COMMAND_USERDATA
|| prev->userdata.id != list->userdata.id
#endif
) {
nk_draw_list_push_command(list, prev->clip_rect, texture);
}
}
}
#ifdef NK_INCLUDE_COMMAND_USERDATA
Expand Down
16 changes: 9 additions & 7 deletions src/nuklear_vertex.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,16 @@ nk_draw_list_push_image(struct nk_draw_list *list, nk_handle texture)
struct nk_draw_command *prev = nk_draw_list_command_last(list);
if (prev->elem_count == 0) {
prev->texture = texture;
#ifdef NK_INCLUDE_COMMAND_USERDATA
#ifdef NK_INCLUDE_COMMAND_USERDATA
prev->userdata = list->userdata;
#endif
} else if (prev->texture.id != texture.id
#ifdef NK_INCLUDE_COMMAND_USERDATA
|| prev->userdata.id != list->userdata.id
#endif
) nk_draw_list_push_command(list, prev->clip_rect, texture);
#endif
} else if (prev->texture.id != texture.id
#ifdef NK_INCLUDE_COMMAND_USERDATA
|| prev->userdata.id != list->userdata.id
#endif
) {
nk_draw_list_push_command(list, prev->clip_rect, texture);
}
}
}
#ifdef NK_INCLUDE_COMMAND_USERDATA
Expand Down

0 comments on commit 8f3fc31

Please sign in to comment.