Differential D10528 Diff 34398 source/blender/editors/interface/interface_template_search_operator.c
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_template_search_operator.c
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | static void operator_search_exec_fn(bContext *C, void *UNUSED(arg1), void *arg2) | ||||
| if (ot) { | if (ot) { | ||||
| WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, NULL); | WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, NULL); | ||||
| } | } | ||||
| } | } | ||||
| static void operator_search_update_fn(const bContext *C, | static void operator_search_update_fn(const bContext *C, | ||||
| void *UNUSED(arg), | void *UNUSED(arg), | ||||
| const char *str, | const char *str, | ||||
| uiSearchItems *items) | uiSearchItems *items, | ||||
| const bool UNUSED(is_first)) | |||||
| { | { | ||||
| GHashIterator iter; | GHashIterator iter; | ||||
| /* Prepare BLI_string_all_words_matched. */ | /* Prepare BLI_string_all_words_matched. */ | ||||
| const size_t str_len = strlen(str); | const size_t str_len = strlen(str); | ||||
| const int words_max = BLI_string_max_possible_word_count(str_len); | const int words_max = BLI_string_max_possible_word_count(str_len); | ||||
| int(*words)[2] = BLI_array_alloca(words, words_max); | int(*words)[2] = BLI_array_alloca(words, words_max); | ||||
| const int words_len = BLI_string_find_split_words(str, str_len, ' ', words, words_max); | const int words_len = BLI_string_find_split_words(str, str_len, ' ', words, words_max); | ||||
| ▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines | |||||