mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04:00
[tracking] Reduce compile warnings
The fallthrough construction in a switch is a bit confusing to read, and generates compile warnings too, so break it up.
This commit is contained in:
parent
defc7d4df8
commit
e2f6d160f8
1 changed files with 8 additions and 5 deletions
|
@ -90,17 +90,20 @@ bool TrackingPage::getTrackingOption(TrackingType t)
|
||||||
|
|
||||||
// A tracking type is enabled if it is checked, or
|
// A tracking type is enabled if it is checked, or
|
||||||
// any higher level is checked.
|
// any higher level is checked.
|
||||||
|
#define ch(x) ui->x->isChecked()
|
||||||
switch ( t )
|
switch ( t )
|
||||||
{
|
{
|
||||||
case TrackingType::InstallTracking:
|
case TrackingType::InstallTracking:
|
||||||
enabled |= ui->installRadio->isChecked();
|
enabled = ch(installRadio) || ch(machineRadio) || ch(userRadio);
|
||||||
// FALLTHRU
|
break;
|
||||||
case TrackingType::MachineTracking:
|
case TrackingType::MachineTracking:
|
||||||
enabled |= ui->machineRadio->isChecked();
|
enabled = ch(machineRadio) || ch(userRadio);
|
||||||
// FALLTHRU
|
break;
|
||||||
case TrackingType::UserTracking:
|
case TrackingType::UserTracking:
|
||||||
enabled |= ui->userRadio->isChecked();
|
enabled = ch(userRadio);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
#undef ch
|
||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue