1
0
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:
Maarten ter Huurne
2014-08-16 16:57:45 +02:00
parent 8a1bb5694f
commit faf2495727
3 changed files with 103 additions and 42 deletions

View File

@@ -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;