Skip to content

Commit 5b75a6c

Browse files
committed
kconfig: qconf: remove 'parent' from ConfigList::updateMenuList()
All the call-sites of this function pass 'this' to the first argument. So, 'parent' is always the 'this' pointer. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 1031685 commit 5b75a6c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

scripts/kconfig/qconf.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ void ConfigList::updateList()
446446
return;
447447
}
448448
update:
449-
updateMenuList(this, rootEntry);
449+
updateMenuList(rootEntry);
450450
update();
451451
resizeColumnToContents(0);
452452
}
@@ -524,7 +524,7 @@ void ConfigList::setRootMenu(struct menu *menu)
524524
type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
525525
if (type != P_MENU)
526526
return;
527-
updateMenuList(this, 0);
527+
updateMenuList(0);
528528
rootEntry = menu;
529529
updateListAll();
530530
if (currentItem()) {
@@ -628,7 +628,7 @@ void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu)
628628
}
629629
}
630630

631-
void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
631+
void ConfigList::updateMenuList(struct menu *menu)
632632
{
633633
struct menu* child;
634634
ConfigItem* item;
@@ -637,19 +637,19 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
637637
enum prop_type type;
638638

639639
if (!menu) {
640-
while (parent->topLevelItemCount() > 0)
640+
while (topLevelItemCount() > 0)
641641
{
642-
delete parent->takeTopLevelItem(0);
642+
delete takeTopLevelItem(0);
643643
}
644644

645645
return;
646646
}
647647

648-
last = (ConfigItem*)parent->topLevelItem(0);
648+
last = (ConfigItem *)topLevelItem(0);
649649
if (last && !last->goParent)
650650
last = 0;
651651
for (child = menu->list; child; child = child->next) {
652-
item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0);
652+
item = last ? last->nextSibling() : (ConfigItem *)topLevelItem(0);
653653
type = child->prompt ? child->prompt->type : P_UNKNOWN;
654654

655655
switch (mode) {
@@ -670,7 +670,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
670670
if (!child->sym && !child->list && !child->prompt)
671671
continue;
672672
if (!item || item->menu != child)
673-
item = new ConfigItem(parent, last, child, visible);
673+
item = new ConfigItem(this, last, child, visible);
674674
else
675675
item->testUpdateMenu(visible);
676676

@@ -683,7 +683,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
683683
}
684684
hide:
685685
if (item && item->menu == child) {
686-
last = (ConfigItem*)parent->topLevelItem(0);
686+
last = (ConfigItem *)topLevelItem(0);
687687
if (last == item)
688688
last = 0;
689689
else while (last->nextSibling() != item)

scripts/kconfig/qconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public slots:
102102
bool menuSkip(struct menu *);
103103

104104
void updateMenuList(ConfigItem *parent, struct menu*);
105-
void updateMenuList(ConfigList *parent, struct menu*);
105+
void updateMenuList(struct menu *menu);
106106

107107
bool updateAll;
108108

0 commit comments

Comments
 (0)