[Bf-blender-cvs] [67d86f310c5] soc-2020-info-editor: Cleanup: memory does not need to be allocated

Mateusz Grzeliński noreply at git.blender.org
Mon Jul 27 09:59:11 CEST 2020


Commit: 67d86f310c580f19e2996a49fa2c8e02643ac171
Author: Mateusz Grzeliński
Date:   Mon Jul 27 09:59:02 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rB67d86f310c580f19e2996a49fa2c8e02643ac171

Cleanup: memory does not need to be allocated

===================================================================

M	source/blender/editors/space_info/textview.c

===================================================================

diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index fb147ad7059..76bf1337826 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -449,11 +449,6 @@ int textview_draw(TextViewContext *tvc,
       BLI_assert(!BLI_listbase_is_empty(&text_lines));
 
       if (do_draw) {
-        TextLine *text_line_iter = text_lines.first;
-        while (text_line_iter) {
-          text_line_iter->format = MEM_callocN(text_line_iter->len + 2, __func__);
-          text_line_iter = text_line_iter->next;
-        }
         data_flag = tvc->line_draw_data(tvc, text_lines.first, fg, bg, &icon, icon_fg, icon_bg);
         assert(data_flag & TVC_LINE_FG_SIMPLE || data_flag & TVC_LINE_FG_COMPLEX);
       }



More information about the Bf-blender-cvs mailing list