From e0d96bf11fcf7466f87b8935a064471eb3011700 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Mon, 13 Apr 2020 17:21:03 +0200 Subject: [PATCH] Fix most warnings. Weird bug in allegro backend dissapeared --- demo/allegro5/Makefile | 2 +- nuklear.h | 53 +++++++++------------------------------- src/nuklear.h | 4 +-- src/nuklear_contextual.c | 6 ++--- src/nuklear_group.c | 2 -- src/nuklear_internal.h | 2 +- src/nuklear_layout.c | 9 +++---- src/nuklear_list_view.c | 1 - src/nuklear_popup.c | 1 - src/nuklear_string.c | 2 +- src/nuklear_tree.c | 8 +----- src/nuklear_widget.c | 10 +------- src/nuklear_window.c | 8 ------ 13 files changed, 25 insertions(+), 83 deletions(-) diff --git a/demo/allegro5/Makefile b/demo/allegro5/Makefile index 4d4207a60..090a126a1 100644 --- a/demo/allegro5/Makefile +++ b/demo/allegro5/Makefile @@ -2,7 +2,7 @@ BIN = demo # Flags -CFLAGS += -std=c99 -pedantic -ggdb -Wall -Wextra -Werror +CFLAGS += -std=c99 -pedantic -O2 SRC = main.c OBJ = $(SRC:.c=.o) diff --git a/nuklear.h b/nuklear.h index e4fc7107a..00cc5c794 100644 --- a/nuklear.h +++ b/nuklear.h @@ -3053,7 +3053,7 @@ enum nk_widget_states { NK_WIDGET_STATE_ACTIVE = NK_WIDGET_STATE_ACTIVED|NK_WIDGET_STATE_MODIFIED /* widget is currently activated */ }; NK_API enum nk_widget_layout_states nk_widget(struct nk_rect*, const struct nk_context*); -NK_API enum nk_widget_layout_states nk_widget_fitting(struct nk_rect*, struct nk_context*, struct nk_vec2); +NK_API enum nk_widget_layout_states nk_widget_fitting(struct nk_rect*, struct nk_context*); NK_API struct nk_rect nk_widget_bounds(struct nk_context*); NK_API struct nk_vec2 nk_widget_position(struct nk_context*); NK_API struct nk_vec2 nk_widget_size(struct nk_context*); @@ -5640,7 +5640,7 @@ template struct nk_alignof{struct Big {T x; char c;}; enum { #endif #ifndef STBTT_malloc -static nk_handle fictional_handle = {0}; +static const nk_handle fictional_handle = {0}; #define STBTT_malloc(x,u) nk_malloc( fictional_handle, 0, x ) #define STBTT_free(x,u) nk_mfree( fictional_handle , x) @@ -5871,7 +5871,7 @@ NK_LIB int nk_panel_begin(struct nk_context *ctx, struct nk_slice title, enum nk NK_LIB void nk_panel_end(struct nk_context *ctx); /* layout */ -NK_LIB float nk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel_type type, float total_space, int columns); +NK_LIB float nk_layout_row_calculate_usable_space(const struct nk_style *style, float total_space, int columns); NK_LIB void nk_panel_layout(const struct nk_context *ctx, struct nk_window *win, float height, int cols); NK_LIB void nk_row_layout(struct nk_context *ctx, enum nk_layout_format fmt, float height, int cols, int width); NK_LIB void nk_panel_alloc_row(const struct nk_context *ctx, struct nk_window *win); @@ -8318,7 +8318,7 @@ nk_str_append_str_char(struct nk_str *s, struct nk_slice str) NK_API int nk_str_append_str_runes(struct nk_str *str, const nk_rune *text, nk_size len) { - int i = 0; + nk_size i = 0; int byte_len = 0; nk_glyph glyph; @@ -20111,7 +20111,6 @@ nk_item_is_any_active(struct nk_context *ctx) NK_API int nk_window_is_collapsed(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -20125,7 +20124,6 @@ nk_window_is_collapsed(struct nk_context *ctx, struct nk_slice name) NK_API int nk_window_is_closed(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -20139,7 +20137,6 @@ nk_window_is_closed(struct nk_context *ctx, struct nk_slice name) NK_API int nk_window_is_hidden(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -20153,7 +20150,6 @@ nk_window_is_hidden(struct nk_context *ctx, struct nk_slice name) NK_API int nk_window_is_active(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -20167,7 +20163,6 @@ nk_window_is_active(struct nk_context *ctx, struct nk_slice name) NK_API struct nk_window* nk_window_find(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; title_hash = nk_murmur_hash(name, NK_WINDOW_TITLE); return nk_find_window(ctx, title_hash, name); @@ -20231,7 +20226,6 @@ NK_API void nk_window_collapse(struct nk_context *ctx, struct nk_slice name, enum nk_collapse_states c) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -20255,7 +20249,6 @@ nk_window_collapse_if(struct nk_context *ctx, struct nk_slice name, NK_API void nk_window_show(struct nk_context *ctx, struct nk_slice name, enum nk_show_states s) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -20280,7 +20273,6 @@ nk_window_show_if(struct nk_context *ctx, struct nk_slice name, NK_API void nk_window_set_focus(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -20311,7 +20303,6 @@ nk_popup_begin(struct nk_context *ctx, enum nk_popup_type type, struct nk_window *win; struct nk_panel *panel; - int title_len; nk_hash title_hash; nk_size allocated; @@ -20644,7 +20635,7 @@ nk_contextual_item_label(struct nk_context *ctx, struct nk_slice text, win = ctx->current; style = &ctx->style; - state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding); + state = nk_widget_fitting(&bounds, ctx); if (!state) return nk_false; in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input; @@ -20674,7 +20665,7 @@ nk_contextual_item_image_label(struct nk_context *ctx, struct nk_image img, win = ctx->current; style = &ctx->style; - state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding); + state = nk_widget_fitting(&bounds, ctx); if (!state) return nk_false; in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input; @@ -20704,7 +20695,7 @@ nk_contextual_item_symbol_label(struct nk_context *ctx, enum nk_symbol_type symb win = ctx->current; style = &ctx->style; - state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding); + state = nk_widget_fitting(&bounds, ctx); if (!state) return nk_false; in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input; @@ -21069,13 +21060,11 @@ nk_layout_reset_min_row_height(struct nk_context *ctx) layout->row.min_height += ctx->style.window.min_row_height_padding*2; } NK_LIB float -nk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel_type type, +nk_layout_row_calculate_usable_space(const struct nk_style *style, float total_space, int columns) { - float panel_padding; float panel_spacing; float panel_space; - struct nk_vec2 spacing; spacing = style->window.spacing; @@ -21417,7 +21406,7 @@ nk_layout_row_template_end(struct nk_context *ctx) } } if (variable_count) { - float space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type, + float space = nk_layout_row_calculate_usable_space(&ctx->style, layout->bounds.w, layout->row.columns); float var_width = (NK_MAX(space-min_fixed_width,0.0f)) / (float)variable_count; int enough_space = var_width >= max_variable_width; @@ -21607,7 +21596,6 @@ nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx, const struct nk_style *style; struct nk_vec2 spacing; - struct nk_vec2 padding; float item_offset = 0; float item_width = 0; @@ -21626,7 +21614,7 @@ nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx, NK_ASSERT(bounds); spacing = style->window.spacing; - panel_space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type, + panel_space = nk_layout_row_calculate_usable_space(&ctx->style, layout->bounds.w, layout->row.columns); #define NK_FRAC(x) (x - (int)x) /* will be used to remove fookin gaps */ @@ -21910,7 +21898,6 @@ nk_tree_base(struct nk_context *ctx, enum nk_tree_type type, struct nk_slice hash, int line) { struct nk_window *win = ctx->current; - int title_len = 0; nk_hash tree_hash = 0; nk_uint *state = 0; @@ -21990,13 +21977,11 @@ nk_tree_element_image_push_hashed_base(struct nk_context *ctx, enum nk_tree_type float row_height; struct nk_vec2 padding; - int text_len; float text_width; struct nk_vec2 item_spacing; struct nk_rect header = {0,0,0,0}; struct nk_rect sym = {0,0,0,0}; - struct nk_text text; nk_flags ws = 0; enum nk_widget_layout_states widget_state; @@ -22026,14 +22011,12 @@ nk_tree_element_image_push_hashed_base(struct nk_context *ctx, enum nk_tree_type const struct nk_style_item *background = &style->tab.background; if (background->type == NK_STYLE_ITEM_IMAGE) { nk_draw_image(out, header, &background->data.image, nk_white); - text.background = nk_rgba(0,0,0,0); } else { - text.background = background->data.color; nk_fill_rect(out, header, 0, style->tab.border_color); nk_fill_rect(out, nk_shrink_rect(header, style->tab.border), style->tab.rounding, background->data.color); } - } else text.background = style->window.background; + } in = (!(layout->flags & NK_WINDOW_ROM)) ? &ctx->input: 0; in = (in && widget_state == NK_WIDGET_VALID) ? &ctx->input : 0; @@ -22091,7 +22074,6 @@ nk_tree_element_base(struct nk_context *ctx, enum nk_tree_type type, int *selected, struct nk_slice hash, int line) { struct nk_window *win = ctx->current; - int title_len = 0; nk_hash tree_hash = 0; nk_uint *state = 0; @@ -22256,7 +22238,6 @@ NK_API int nk_group_begin_titled(struct nk_context *ctx, struct nk_slice id, struct nk_slice title, nk_flags flags) { - int id_len; nk_hash id_hash; struct nk_window *win; nk_uint *x_offset; @@ -22297,7 +22278,6 @@ nk_group_end(struct nk_context *ctx) NK_API void nk_group_get_scroll(struct nk_context *ctx, struct nk_slice id, nk_uint *x_offset, nk_uint *y_offset) { - int id_len; nk_hash id_hash; struct nk_window *win; nk_uint *x_offset_ptr; @@ -22372,7 +22352,6 @@ NK_API int nk_list_view_begin(struct nk_context *ctx, struct nk_list_view *view, struct nk_slice title, nk_flags flags, int row_height, int row_count) { - int title_len; nk_hash title_hash; nk_uint *x_offset; nk_uint *y_offset; @@ -22624,15 +22603,10 @@ nk_widget(struct nk_rect *bounds, const struct nk_context *ctx) return NK_WIDGET_VALID; } NK_API enum nk_widget_layout_states -nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx, - struct nk_vec2 item_padding) +nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx) { /* update the bounds to stand without padding */ - struct nk_window *win; - struct nk_style *style; - struct nk_panel *layout; enum nk_widget_layout_states state; - struct nk_vec2 panel_padding; NK_ASSERT(ctx); NK_ASSERT(ctx->current); @@ -22640,9 +22614,6 @@ nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx, if (!ctx || !ctx->current || !ctx->current->layout) return NK_WIDGET_INVALID; - win = ctx->current; - style = &ctx->style; - layout = win->layout; state = nk_widget(bounds, ctx); return state; } diff --git a/src/nuklear.h b/src/nuklear.h index 129354c52..21a769948 100644 --- a/src/nuklear.h +++ b/src/nuklear.h @@ -2834,7 +2834,7 @@ enum nk_widget_states { NK_WIDGET_STATE_ACTIVE = NK_WIDGET_STATE_ACTIVED|NK_WIDGET_STATE_MODIFIED /* widget is currently activated */ }; NK_API enum nk_widget_layout_states nk_widget(struct nk_rect*, const struct nk_context*); -NK_API enum nk_widget_layout_states nk_widget_fitting(struct nk_rect*, struct nk_context*, struct nk_vec2); +NK_API enum nk_widget_layout_states nk_widget_fitting(struct nk_rect*, struct nk_context*); NK_API struct nk_rect nk_widget_bounds(struct nk_context*); NK_API struct nk_vec2 nk_widget_position(struct nk_context*); NK_API struct nk_vec2 nk_widget_size(struct nk_context*); @@ -5421,7 +5421,7 @@ template struct nk_alignof{struct Big {T x; char c;}; enum { #endif #ifndef STBTT_malloc -static nk_handle fictional_handle = {0}; +static const nk_handle fictional_handle = {0}; #define STBTT_malloc(x,u) nk_malloc( fictional_handle, 0, x ) #define STBTT_free(x,u) nk_mfree( fictional_handle , x) diff --git a/src/nuklear_contextual.c b/src/nuklear_contextual.c index a73a917b8..eb3d3a9f6 100644 --- a/src/nuklear_contextual.c +++ b/src/nuklear_contextual.c @@ -84,7 +84,7 @@ nk_contextual_item_label(struct nk_context *ctx, struct nk_slice text, win = ctx->current; style = &ctx->style; - state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding); + state = nk_widget_fitting(&bounds, ctx); if (!state) return nk_false; in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input; @@ -114,7 +114,7 @@ nk_contextual_item_image_label(struct nk_context *ctx, struct nk_image img, win = ctx->current; style = &ctx->style; - state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding); + state = nk_widget_fitting(&bounds, ctx); if (!state) return nk_false; in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input; @@ -144,7 +144,7 @@ nk_contextual_item_symbol_label(struct nk_context *ctx, enum nk_symbol_type symb win = ctx->current; style = &ctx->style; - state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding); + state = nk_widget_fitting(&bounds, ctx); if (!state) return nk_false; in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input; diff --git a/src/nuklear_group.c b/src/nuklear_group.c index 5223383b2..e6fb59af5 100644 --- a/src/nuklear_group.c +++ b/src/nuklear_group.c @@ -127,7 +127,6 @@ NK_API int nk_group_begin_titled(struct nk_context *ctx, struct nk_slice id, struct nk_slice title, nk_flags flags) { - int id_len; nk_hash id_hash; struct nk_window *win; nk_uint *x_offset; @@ -168,7 +167,6 @@ nk_group_end(struct nk_context *ctx) NK_API void nk_group_get_scroll(struct nk_context *ctx, struct nk_slice id, nk_uint *x_offset, nk_uint *y_offset) { - int id_len; nk_hash id_hash; struct nk_window *win; nk_uint *x_offset_ptr; diff --git a/src/nuklear_internal.h b/src/nuklear_internal.h index a57050188..4764687de 100644 --- a/src/nuklear_internal.h +++ b/src/nuklear_internal.h @@ -219,7 +219,7 @@ NK_LIB int nk_panel_begin(struct nk_context *ctx, struct nk_slice title, enum nk NK_LIB void nk_panel_end(struct nk_context *ctx); /* layout */ -NK_LIB float nk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel_type type, float total_space, int columns); +NK_LIB float nk_layout_row_calculate_usable_space(const struct nk_style *style, float total_space, int columns); NK_LIB void nk_panel_layout(const struct nk_context *ctx, struct nk_window *win, float height, int cols); NK_LIB void nk_row_layout(struct nk_context *ctx, enum nk_layout_format fmt, float height, int cols, int width); NK_LIB void nk_panel_alloc_row(const struct nk_context *ctx, struct nk_window *win); diff --git a/src/nuklear_layout.c b/src/nuklear_layout.c index 108e3bb48..9bcc73987 100644 --- a/src/nuklear_layout.c +++ b/src/nuklear_layout.c @@ -41,13 +41,11 @@ nk_layout_reset_min_row_height(struct nk_context *ctx) layout->row.min_height += ctx->style.window.min_row_height_padding*2; } NK_LIB float -nk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel_type type, +nk_layout_row_calculate_usable_space(const struct nk_style *style, float total_space, int columns) { - float panel_padding; float panel_spacing; float panel_space; - struct nk_vec2 spacing; spacing = style->window.spacing; @@ -389,7 +387,7 @@ nk_layout_row_template_end(struct nk_context *ctx) } } if (variable_count) { - float space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type, + float space = nk_layout_row_calculate_usable_space(&ctx->style, layout->bounds.w, layout->row.columns); float var_width = (NK_MAX(space-min_fixed_width,0.0f)) / (float)variable_count; int enough_space = var_width >= max_variable_width; @@ -579,7 +577,6 @@ nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx, const struct nk_style *style; struct nk_vec2 spacing; - struct nk_vec2 padding; float item_offset = 0; float item_width = 0; @@ -598,7 +595,7 @@ nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx, NK_ASSERT(bounds); spacing = style->window.spacing; - panel_space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type, + panel_space = nk_layout_row_calculate_usable_space(&ctx->style, layout->bounds.w, layout->row.columns); #define NK_FRAC(x) (x - (int)x) /* will be used to remove fookin gaps */ diff --git a/src/nuklear_list_view.c b/src/nuklear_list_view.c index 935e39c9e..3cb501ccf 100644 --- a/src/nuklear_list_view.c +++ b/src/nuklear_list_view.c @@ -10,7 +10,6 @@ NK_API int nk_list_view_begin(struct nk_context *ctx, struct nk_list_view *view, struct nk_slice title, nk_flags flags, int row_height, int row_count) { - int title_len; nk_hash title_hash; nk_uint *x_offset; nk_uint *y_offset; diff --git a/src/nuklear_popup.c b/src/nuklear_popup.c index c3ab5403a..a509c6fae 100644 --- a/src/nuklear_popup.c +++ b/src/nuklear_popup.c @@ -14,7 +14,6 @@ nk_popup_begin(struct nk_context *ctx, enum nk_popup_type type, struct nk_window *win; struct nk_panel *panel; - int title_len; nk_hash title_hash; nk_size allocated; diff --git a/src/nuklear_string.c b/src/nuklear_string.c index b6b7d5c0b..321936c77 100644 --- a/src/nuklear_string.c +++ b/src/nuklear_string.c @@ -47,7 +47,7 @@ nk_str_append_str_char(struct nk_str *s, struct nk_slice str) NK_API int nk_str_append_str_runes(struct nk_str *str, const nk_rune *text, nk_size len) { - int i = 0; + nk_size i = 0; int byte_len = 0; nk_glyph glyph; diff --git a/src/nuklear_tree.c b/src/nuklear_tree.c index d07531e5f..682edf3cb 100644 --- a/src/nuklear_tree.c +++ b/src/nuklear_tree.c @@ -120,7 +120,6 @@ nk_tree_base(struct nk_context *ctx, enum nk_tree_type type, struct nk_slice hash, int line) { struct nk_window *win = ctx->current; - int title_len = 0; nk_hash tree_hash = 0; nk_uint *state = 0; @@ -200,13 +199,11 @@ nk_tree_element_image_push_hashed_base(struct nk_context *ctx, enum nk_tree_type float row_height; struct nk_vec2 padding; - int text_len; float text_width; struct nk_vec2 item_spacing; struct nk_rect header = {0,0,0,0}; struct nk_rect sym = {0,0,0,0}; - struct nk_text text; nk_flags ws = 0; enum nk_widget_layout_states widget_state; @@ -236,14 +233,12 @@ nk_tree_element_image_push_hashed_base(struct nk_context *ctx, enum nk_tree_type const struct nk_style_item *background = &style->tab.background; if (background->type == NK_STYLE_ITEM_IMAGE) { nk_draw_image(out, header, &background->data.image, nk_white); - text.background = nk_rgba(0,0,0,0); } else { - text.background = background->data.color; nk_fill_rect(out, header, 0, style->tab.border_color); nk_fill_rect(out, nk_shrink_rect(header, style->tab.border), style->tab.rounding, background->data.color); } - } else text.background = style->window.background; + } in = (!(layout->flags & NK_WINDOW_ROM)) ? &ctx->input: 0; in = (in && widget_state == NK_WIDGET_VALID) ? &ctx->input : 0; @@ -301,7 +296,6 @@ nk_tree_element_base(struct nk_context *ctx, enum nk_tree_type type, int *selected, struct nk_slice hash, int line) { struct nk_window *win = ctx->current; - int title_len = 0; nk_hash tree_hash = 0; nk_uint *state = 0; diff --git a/src/nuklear_widget.c b/src/nuklear_widget.c index a20482e2f..6ce4ce53e 100644 --- a/src/nuklear_widget.c +++ b/src/nuklear_widget.c @@ -180,15 +180,10 @@ nk_widget(struct nk_rect *bounds, const struct nk_context *ctx) return NK_WIDGET_VALID; } NK_API enum nk_widget_layout_states -nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx, - struct nk_vec2 item_padding) +nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx) { /* update the bounds to stand without padding */ - struct nk_window *win; - struct nk_style *style; - struct nk_panel *layout; enum nk_widget_layout_states state; - struct nk_vec2 panel_padding; NK_ASSERT(ctx); NK_ASSERT(ctx->current); @@ -196,9 +191,6 @@ nk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx, if (!ctx || !ctx->current || !ctx->current->layout) return NK_WIDGET_INVALID; - win = ctx->current; - style = &ctx->style; - layout = win->layout; state = nk_widget(bounds, ctx); return state; } diff --git a/src/nuklear_window.c b/src/nuklear_window.c index 81aa10879..744886104 100644 --- a/src/nuklear_window.c +++ b/src/nuklear_window.c @@ -470,7 +470,6 @@ nk_item_is_any_active(struct nk_context *ctx) NK_API int nk_window_is_collapsed(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -484,7 +483,6 @@ nk_window_is_collapsed(struct nk_context *ctx, struct nk_slice name) NK_API int nk_window_is_closed(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -498,7 +496,6 @@ nk_window_is_closed(struct nk_context *ctx, struct nk_slice name) NK_API int nk_window_is_hidden(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -512,7 +509,6 @@ nk_window_is_hidden(struct nk_context *ctx, struct nk_slice name) NK_API int nk_window_is_active(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -526,7 +522,6 @@ nk_window_is_active(struct nk_context *ctx, struct nk_slice name) NK_API struct nk_window* nk_window_find(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; title_hash = nk_murmur_hash(name, NK_WINDOW_TITLE); return nk_find_window(ctx, title_hash, name); @@ -590,7 +585,6 @@ NK_API void nk_window_collapse(struct nk_context *ctx, struct nk_slice name, enum nk_collapse_states c) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -614,7 +608,6 @@ nk_window_collapse_if(struct nk_context *ctx, struct nk_slice name, NK_API void nk_window_show(struct nk_context *ctx, struct nk_slice name, enum nk_show_states s) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx); @@ -639,7 +632,6 @@ nk_window_show_if(struct nk_context *ctx, struct nk_slice name, NK_API void nk_window_set_focus(struct nk_context *ctx, struct nk_slice name) { - int title_len; nk_hash title_hash; struct nk_window *win; NK_ASSERT(ctx);