mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Use unique_ptr to make ownership of MenuSettings explicit
This commit is contained in:
@@ -42,13 +42,6 @@ SettingsDialog::SettingsDialog(
|
||||
}
|
||||
}
|
||||
|
||||
SettingsDialog::~SettingsDialog() {
|
||||
for (vector<MenuSetting *>::iterator it = settings.begin();
|
||||
it != settings.end(); ++it) {
|
||||
delete *it;
|
||||
}
|
||||
}
|
||||
|
||||
bool SettingsDialog::exec() {
|
||||
OffscreenSurface bg(*gmenu2x->bg);
|
||||
bg.convertToDisplayFormat();
|
||||
@@ -151,10 +144,6 @@ bool SettingsDialog::exec() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void SettingsDialog::addSetting(MenuSetting *set) {
|
||||
settings.push_back(set);
|
||||
}
|
||||
|
||||
bool SettingsDialog::edited() {
|
||||
for (uint i=0; i < settings.size(); i++) {
|
||||
if (settings[i]->edited()) return true;
|
||||
|
||||
Reference in New Issue
Block a user