diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-02-06 07:31:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-02-06 07:34:36 +0300 |
commit | f9f04726e5a4387d89edb3f067f6f0e4dff58a28 (patch) | |
tree | 2e0ceb1787e12ccca1e7d4d96d9aa5e648e17dde /source/blender/editors/space_text | |
parent | 4cbf2ebdc924db94681bb154e58385f32d1ba9a3 (diff) |
GHash: no need to malloc iterators
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_autocomplete.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c index 19af71c9139..1637ae14892 100644 --- a/source/blender/editors/space_text/text_autocomplete.c +++ b/source/blender/editors/space_text/text_autocomplete.c @@ -207,18 +207,16 @@ static GHash *text_autocomplete_build(Text *text) } { - GHashIterator *iter = BLI_ghashIterator_new(gh); + GHashIterator gh_iter; /* get the formatter for highlighting */ TextFormatType *tft; tft = ED_text_format_get(text); - for (; !BLI_ghashIterator_done(iter); BLI_ghashIterator_step(iter)) { - const char *s = BLI_ghashIterator_getValue(iter); + GHASH_ITER (gh_iter, gh) { + const char *s = BLI_ghashIterator_getValue(&gh_iter); texttool_suggest_add(s, tft->format_identifier(s)); } - BLI_ghashIterator_free(iter); - } } |