mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
Use std::unique_ptr in SpellWindow
This commit is contained in:
parent
6d65885bd2
commit
1b9da77455
@ -34,7 +34,7 @@ namespace MWGui
|
||||
, mSpellView(nullptr)
|
||||
, mUpdateTimer(0.0f)
|
||||
{
|
||||
mSpellIcons = new SpellIcons();
|
||||
mSpellIcons = std::make_unique<SpellIcons>();
|
||||
|
||||
MyGUI::Widget* deleteButton;
|
||||
getWidget(deleteButton, "DeleteSpellButton");
|
||||
@ -54,11 +54,6 @@ namespace MWGui
|
||||
mFilterEdit->setSize(filterWidth, mFilterEdit->getSize().height);
|
||||
}
|
||||
|
||||
SpellWindow::~SpellWindow()
|
||||
{
|
||||
delete mSpellIcons;
|
||||
}
|
||||
|
||||
void SpellWindow::onPinToggled()
|
||||
{
|
||||
Settings::Manager::setBool("spells pin", "Windows", mPinned);
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef MWGUI_SPELLWINDOW_H
|
||||
#define MWGUI_SPELLWINDOW_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "windowpinnablebase.hpp"
|
||||
|
||||
#include "spellmodel.hpp"
|
||||
@ -14,7 +16,6 @@ namespace MWGui
|
||||
{
|
||||
public:
|
||||
SpellWindow(DragAndDrop* drag);
|
||||
virtual ~SpellWindow();
|
||||
|
||||
void updateSpells();
|
||||
|
||||
@ -41,7 +42,7 @@ namespace MWGui
|
||||
void onOpen() override;
|
||||
|
||||
SpellView* mSpellView;
|
||||
SpellIcons* mSpellIcons;
|
||||
std::unique_ptr<SpellIcons> mSpellIcons;
|
||||
MyGUI::EditBox* mFilterEdit;
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user