Use unique_ptr on all ui objects from .ui files (#5511)
* Forward declare ui and use unique_ptr * ConfigureEnhancements: use unique_ptr for ui * Use make_unique instead of new where applicable * Move some of the ui includes that already used unique_ptr * main.cpp: also make use of make_unique on Config * Address review comments
This commit is contained in:
parent
a576eb633f
commit
a26b466ac8
17 changed files with 257 additions and 229 deletions
|
@ -11,7 +11,7 @@
|
|||
#include "video_core/renderer_opengl/texture_filters/texture_filterer.h"
|
||||
|
||||
ConfigureEnhancements::ConfigureEnhancements(QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureEnhancements) {
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureEnhancements>()) {
|
||||
ui->setupUi(this);
|
||||
|
||||
for (const auto& filter : OpenGL::TextureFilterer::GetFilterNames())
|
||||
|
@ -128,6 +128,4 @@ void ConfigureEnhancements::ApplyConfiguration() {
|
|||
Settings::values.bg_blue = static_cast<float>(bg_color.blueF());
|
||||
}
|
||||
|
||||
ConfigureEnhancements::~ConfigureEnhancements() {
|
||||
delete ui;
|
||||
}
|
||||
ConfigureEnhancements::~ConfigureEnhancements() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue