[Bf-blender-cvs] [37c76a7ec63] master: Cleanup: replace comments with meaningful variable names

Campbell Barton noreply at git.blender.org
Wed Apr 17 09:18:17 CEST 2019


Commit: 37c76a7ec63dfcdc7e3aac9c348280188b20aaf9
Author: Campbell Barton
Date:   Wed Apr 17 09:05:56 2019 +0200
Branches: master
https://developer.blender.org/rB37c76a7ec63dfcdc7e3aac9c348280188b20aaf9

Cleanup: replace comments with meaningful variable names

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

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

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

diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index c834ea31bd4..a89d161b708 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -3742,9 +3742,10 @@ static void ui_litem_layout_column_flow(uiLayout *litem)
       emy = 0; /* need to reset height again for next column */
       col++;
 
-      /*  (<     remaining width     > - <      space between remaining columns      >) / <remamining columns > */
-      w = ((litem->w - (x - litem->x)) - (flow->totcol - col - 1) * style->columnspace) /
-          (flow->totcol - col);
+      const int remaining_width = litem->w - (x - litem->x);
+      const int remaining_width_between_columns = (flow->totcol - col - 1) * style->columnspace;
+      const int remaining_columns = flow->totcol - col;
+      w = (remaining_width - remaining_width_between_columns) / remaining_columns;
     }
   }



More information about the Bf-blender-cvs mailing list