@@ -35,7 +35,7 @@ ObjectClass ScreenTabListItem_class = {
35
35
36
36
static void ScreenNamesPanel_fill (ScreenNamesPanel * this , DynamicScreen * ds ) {
37
37
const Settings * settings = this -> settings ;
38
- Panel * super = ( Panel * ) this ;
38
+ Panel * super = & this -> super ;
39
39
Panel_prune (super );
40
40
41
41
for (unsigned int i = 0 ; i < settings -> nScreens ; i ++ ) {
@@ -59,10 +59,8 @@ static void ScreenNamesPanel_fill(ScreenNamesPanel* this, DynamicScreen* ds) {
59
59
}
60
60
61
61
static void ScreenTabsPanel_delete (Object * object ) {
62
- Panel * super = (Panel * ) object ;
63
62
ScreenTabsPanel * this = (ScreenTabsPanel * ) object ;
64
-
65
- Panel_done (super );
63
+ Panel_done (& this -> super );
66
64
free (this );
67
65
}
68
66
@@ -138,7 +136,8 @@ static const char* const ScreenTabsFunctions[] = {" ", " ", " ",
138
136
139
137
ScreenTabsPanel * ScreenTabsPanel_new (Settings * settings ) {
140
138
ScreenTabsPanel * this = AllocThis (ScreenTabsPanel );
141
- Panel * super = (Panel * ) this ;
139
+ Panel * super = & this -> super ;
140
+
142
141
FunctionBar * fuBar = FunctionBar_new (ScreenTabsFunctions , NULL , NULL );
143
142
Panel_init (super , 1 , 1 , 1 , 1 , Class (ListItem ), true, fuBar );
144
143
@@ -174,8 +173,8 @@ ScreenNameListItem* ScreenNameListItem_new(const char* value, ScreenSettings* ss
174
173
static const char * const ScreenNamesFunctions [] = {" " , " " , " " , " " , "New " , " " , " " , " " , " " , "Done " , NULL };
175
174
176
175
static void ScreenNamesPanel_delete (Object * object ) {
177
- Panel * super = (Panel * ) object ;
178
176
ScreenNamesPanel * this = (ScreenNamesPanel * ) object ;
177
+ Panel * super = & this -> super ;
179
178
180
179
/* do not delete screen settings still in use */
181
180
int n = Panel_size (super );
@@ -350,7 +349,8 @@ PanelClass ScreenNamesPanel_class = {
350
349
351
350
ScreenNamesPanel * ScreenNamesPanel_new (Settings * settings ) {
352
351
ScreenNamesPanel * this = AllocThis (ScreenNamesPanel );
353
- Panel * super = (Panel * ) this ;
352
+ Panel * super = & this -> super ;
353
+
354
354
FunctionBar * fuBar = FunctionBar_new (ScreenNamesFunctions , NULL , NULL );
355
355
Panel_init (super , 1 , 1 , 1 , 1 , Class (ListItem ), true, fuBar );
356
356
0 commit comments