Commit: 9e03d90cc60f783b7fea728b4a6bf8b3333e0eff
Author: Mateusz Grzeliński
Date: Mon Aug 17 11:25:24 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rB9e03d90cc60f783b7fea728b4a6bf8b3333e0eff
Cleanup: move function
===================================================================
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 badd61c0e70..c779e9483df 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -388,25 +388,6 @@ static bool textview_draw_string(TextViewDrawState *tds,
return true;
}
-static void textview_clear_text_lines(ListBase *text_lines)
-{
- if (!BLI_listbase_is_empty(text_lines)) {
- TextViewContextLine *text_line_iter = text_lines->first;
- while (text_line_iter) {
- TextViewContextLine *text_line_next = text_line_iter->next;
- if (text_line_iter->format) {
- MEM_freeN(text_line_iter->format);
- }
- if (text_line_iter->owns_line) {
- MEM_freeN(text_line_iter->line);
- }
- MEM_freeN(text_line_iter);
- text_line_iter = text_line_next;
- }
- BLI_listbase_clear(text_lines);
- }
-}
-
/** keep in sync with textview_draw_multiline_dry_run */
static bool textview_draw_multiline(const uchar *fg,
const uchar *bg,
@@ -455,6 +436,25 @@ static bool textview_draw_multiline(const uchar *fg,
return is_out_of_view_y;
}
+static void textview_clear_text_lines(ListBase *text_lines)
+{
+ if (!BLI_listbase_is_empty(text_lines)) {
+ TextViewContextLine *text_line_iter = text_lines->first;
+ while (text_line_iter) {
+ TextViewContextLine *text_line_next = text_line_iter->next;
+ if (text_line_iter->format) {
+ MEM_freeN(text_line_iter->format);
+ }
+ if (text_line_iter->owns_line) {
+ MEM_freeN(text_line_iter->line);
+ }
+ MEM_freeN(text_line_iter);
+ text_line_iter = text_line_next;
+ }
+ BLI_listbase_clear(text_lines);
+ }
+}
+
/**
* \param r_mval_pick_item: The resulting item clicked on using \a mval_init.
* Set from the void pointer which holds the current iterator.
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs