[Bf-blender-cvs] [b68eb75210a] soc-2020-info-editor: Cleanup make function private

Mateusz Grzeliński noreply at git.blender.org
Fri Jul 24 18:31:39 CEST 2020


Commit: b68eb75210a15fd93767f790d7f6c869d9829e39
Author: Mateusz Grzeliński
Date:   Fri Jul 24 17:20:37 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rBb68eb75210a15fd93767f790d7f6c869d9829e39

Cleanup make function private

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

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

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

diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index 547a8063446..fb147ad7059 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -344,6 +344,22 @@ 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)) {
+    TextLine *text_line_iter = text_lines->first;
+    while (text_line_iter) {
+      TextLine *text_line_next = text_line_iter->next;
+      if (text_line_iter->format) {
+        MEM_freeN(text_line_iter->format);
+      }
+      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.
@@ -498,20 +514,4 @@ int textview_draw(TextViewContext *tvc,
   xy[1] += tvc->lheight * 2;
 
   return xy[1] - y_orig;
-}
-
-void textview_clear_text_lines(ListBase *text_lines)
-{
-  if (!BLI_listbase_is_empty(text_lines)) {
-    TextLine *text_line_iter = text_lines->first;
-    while (text_line_iter) {
-      TextLine *text_line_next = text_line_iter->next;
-      if (text_line_iter->format) {
-        MEM_freeN(text_line_iter->format);
-      }
-      MEM_freeN(text_line_iter);
-      text_line_iter = text_line_next;
-    }
-    BLI_listbase_clear(text_lines);
-  }
 }
\ No newline at end of file
diff --git a/source/blender/editors/space_info/textview.h b/source/blender/editors/space_info/textview.h
index 40d58ee4e18..04e41a1d8ce 100644
--- a/source/blender/editors/space_info/textview.h
+++ b/source/blender/editors/space_info/textview.h
@@ -82,6 +82,5 @@ int textview_draw(struct TextViewContext *tvc,
                   const int mval_init[2],
                   void **r_mval_pick_item,
                   int *r_mval_pick_offset);
-void textview_clear_text_lines(ListBase *text_lines);
 
 #endif /* __TEXTVIEW_H__ */



More information about the Bf-blender-cvs mailing list