[Bf-blender-cvs] [1807c09986] uiTable: Cleanup: Add assert, remove unused variable

Julian Eisel noreply at git.blender.org
Sun Feb 5 17:25:39 CET 2017


Commit: 1807c099866857c60535aa9caaacd5c76080862b
Author: Julian Eisel
Date:   Sun Feb 5 17:25:12 2017 +0100
Branches: uiTable
https://developer.blender.org/rB1807c099866857c60535aa9caaacd5c76080862b

Cleanup: Add assert, remove unused variable

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

M	source/blender/editors/interface/table.c

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

diff --git a/source/blender/editors/interface/table.c b/source/blender/editors/interface/table.c
index 514af17131..d2a977677d 100644
--- a/source/blender/editors/interface/table.c
+++ b/source/blender/editors/interface/table.c
@@ -99,9 +99,6 @@ typedef struct uiTableColumn {
 /* -------------------------------------------------------------------- */
 
 struct TableColumnDrawInfo {
-	/* Total width of all columns. */
-	unsigned int totwidth_columns;
-
 	/* While drawing: Total width of the already drawn columns depending on alignment (left of right). */
 	unsigned int totwidth_left;
 	unsigned int totwidth_right;
@@ -280,6 +277,7 @@ void UI_table_max_width_set(uiTable *table, const unsigned int max_width)
 void UI_table_horizontal_flow_max_height_set(uiTable *table, const unsigned int max_height)
 {
 	TableHorizontalFlow *horizontal_table = (TableHorizontalFlow *)table;
+	BLI_assert(table->flow_direction == TABLE_FLOW_HORIZONTAL);
 	horizontal_table->max_height = max_height;
 }




More information about the Bf-blender-cvs mailing list