diff options
author | Julian Eisel <julian@blender.org> | 2022-05-12 16:53:12 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-05-12 17:56:14 +0300 |
commit | 3693e1d8e80501c6efcb8f732107742f80acf773 (patch) | |
tree | 2fc6177061859beff71ffd3413fad4131724be82 /source/blender/editors/interface/interface_region_search.cc | |
parent | c31f519954f2b21fecc86b1b3b9386685226dbdc (diff) |
Revert commits to increase button flag bitfield size
This reverts the commits 8d9d5da13706b668b9bd0d631e00c9b00b73f3ea,
59cd616534b46ab85b4324a0886bd9eb8876a48b and
98a04ed4524234b1840dc039c2f356db5ac57f26.
The commits are causing issues with MSVC, see D14926. I'm working on a
different solution, but that will need some work.
Diffstat (limited to 'source/blender/editors/interface/interface_region_search.cc')
-rw-r--r-- | source/blender/editors/interface/interface_region_search.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_region_search.cc b/source/blender/editors/interface/interface_region_search.cc index 016abb2f021..bc497e2647c 100644 --- a/source/blender/editors/interface/interface_region_search.cc +++ b/source/blender/editors/interface/interface_region_search.cc @@ -58,7 +58,7 @@ struct uiSearchItems { char **names; void **pointers; int *icons; - uint64_t *states; + int *states; uint8_t *name_prefix_offsets; /** Is there any item with an icon? */ @@ -94,7 +94,7 @@ bool UI_search_item_add(uiSearchItems *items, const char *name, void *poin, int iconid, - uint64_t state, + int state, const uint8_t name_prefix_offset) { /* hijack for autocomplete */ @@ -556,7 +556,7 @@ static void ui_searchbox_region_draw_fn(const bContext *C, ARegion *region) if (data->preview) { /* draw items */ for (int a = 0; a < data->items.totitem; a++) { - const uint64_t state = ((a == data->active) ? UI_ACTIVE : 0) | data->items.states[a]; + const int state = ((a == data->active) ? UI_ACTIVE : 0) | data->items.states[a]; /* ensure icon is up-to-date */ ui_icon_ensure_deferred(C, data->items.icons[a], data->preview); @@ -590,7 +590,7 @@ static void ui_searchbox_region_draw_fn(const bContext *C, ARegion *region) const int search_sep_len = data->sep_string ? strlen(data->sep_string) : 0; /* draw items */ for (int a = 0; a < data->items.totitem; a++) { - const uint64_t state = ((a == data->active) ? UI_ACTIVE : 0) | data->items.states[a]; + const int state = ((a == data->active) ? UI_ACTIVE : 0) | data->items.states[a]; char *name = data->items.names[a]; int icon = data->items.icons[a]; char *name_sep_test = nullptr; @@ -847,7 +847,7 @@ static ARegion *ui_searchbox_create_generic_ex(bContext *C, data->items.names = (char **)MEM_callocN(data->items.maxitem * sizeof(void *), __func__); data->items.pointers = (void **)MEM_callocN(data->items.maxitem * sizeof(void *), __func__); data->items.icons = (int *)MEM_callocN(data->items.maxitem * sizeof(int), __func__); - data->items.states = (uint64_t *)MEM_callocN(data->items.maxitem * sizeof(uint64_t), __func__); + data->items.states = (int *)MEM_callocN(data->items.maxitem * sizeof(int), __func__); data->items.name_prefix_offsets = nullptr; /* Lazy initialized as needed. */ for (int i = 0; i < data->items.maxitem; i++) { data->items.names[i] = (char *)MEM_callocN(data->items.maxstrlen + 1, __func__); @@ -913,7 +913,7 @@ static void ui_searchbox_region_draw_cb__operator(const bContext *UNUSED(C), ARe /* widget itself */ /* NOTE: i18n messages extracting tool does the same, please keep it in sync. */ { - const uint64_t state = ((a == data->active) ? UI_ACTIVE : 0) | data->items.states[a]; + const int state = ((a == data->active) ? UI_ACTIVE : 0) | data->items.states[a]; wmOperatorType *ot = static_cast<wmOperatorType *>(data->items.pointers[a]); char text_pre[128]; |