Convert Fl_Group::array_ to union to better represent its behavior

Amended by Albrecht:

- rename union member variables as discussed
- add comments to new array_ union members

Fixes #96

Signed-off-by: Albrecht Schlosser <albrechts.fltk@online.de>
This commit is contained in:
Robert Schumacher
2020-07-08 18:07:50 -07:00
committed by Albrecht Schlosser
parent 2b88ce521d
commit 8d5eed3c82
2 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -41,7 +41,10 @@ class Fl_Rect;
*/
class FL_EXPORT Fl_Group : public Fl_Widget {
Fl_Widget** array_;
union {
Fl_Widget** array_; // used if group has two or more children or NULL
Fl_Widget* child1_; // used if group has one child or NULL
};
Fl_Widget* savedfocus_;
Fl_Widget* resizable_;
int children_;