Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-10-28 17:41:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2014-10-28 17:41:05 +0300
commitcb7afe5e419c1219ec3e96c580225d4603089167 (patch)
treea2932f31543283785f02efc68ca3286c1982746c /source/blender/editors/space_view3d/view3d_toolbar.c
parentbfa24aa945ae10bbe1f954704929fbf05db800ef (diff)
WM: unneeded alloc the operator-type iterator
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_toolbar.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index 3f7f12d2020..11e91800f88 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -151,10 +151,10 @@ static void operator_call_cb(struct bContext *C, void *arg_listbase, void *arg2)
static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), const char *str, uiSearchItems *items)
{
- GHashIterator *iter = WM_operatortype_iter();
+ GHashIterator iter;
- for (; !BLI_ghashIterator_done(iter); BLI_ghashIterator_step(iter)) {
- wmOperatorType *ot = BLI_ghashIterator_getValue(iter);
+ for (WM_operatortype_iter(&iter); !BLI_ghashIterator_done(&iter); BLI_ghashIterator_step(&iter)) {
+ wmOperatorType *ot = BLI_ghashIterator_getValue(&iter);
if (BLI_strcasestr(ot->name, str)) {
if (WM_operator_poll((bContext *)C, ot)) {
@@ -164,7 +164,6 @@ static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), cons
}
}
}
- BLI_ghashIterator_free(iter);
}