summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorRobert Schumacher <ras0219@outlook.com>2020-07-08 18:07:50 -0700
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-10 18:09:28 +0200
commit8d5eed3c82fa6f59c4f9d860f1d5c6bbdd837d80 (patch)
tree83592486674c564be7fa8cec6a45b6ff9c042fad /FL
parent2b88ce521dbdb9bbac2c89d8fa2e23e7270d1723 (diff)
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>
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Group.H5
1 files changed, 4 insertions, 1 deletions
diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H
index 26baf9726..61ae51093 100644
--- a/FL/Fl_Group.H
+++ b/FL/Fl_Group.H
@@ -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_;