Classes that have unique_ptr in headers can't also have defaulted d'tors.

I haven't figured out exactly why this is yet, but compilation fails in gcc and clang otherwise.
This commit is contained in:
Stephen Anthony 2018-12-30 10:23:16 -03:30
parent b1811f5a9f
commit ae69545056
3 changed files with 10 additions and 5 deletions

View File

@ -41,16 +41,16 @@ CommandDialog::CommandDialog(OSystem& osystem, DialogContainer& parent)
// Set real dimensions // Set real dimensions
_w = 3 * (buttonWidth + 5) + HBORDER * 2; _w = 3 * (buttonWidth + 5) + HBORDER * 2;
_h = 6 * rowHeight - VGAP + VBORDER * 2 + _th; _h = 6 * rowHeight - VGAP + VBORDER * 2 + _th;
ButtonWidget* bw; ButtonWidget* bw = nullptr;
WidgetArray wid; WidgetArray wid;
int xoffset = HBORDER, yoffset = VBORDER + _th; int xoffset = HBORDER, yoffset = VBORDER + _th;
auto ADD_CD_BUTTON = [&](const string& label, int cmd) auto ADD_CD_BUTTON = [&](const string& label, int cmd)
{ {
ButtonWidget* bw = new ButtonWidget(this, _font, xoffset, yoffset, ButtonWidget* b = new ButtonWidget(this, _font, xoffset, yoffset,
buttonWidth, buttonHeight, label, cmd); buttonWidth, buttonHeight, label, cmd);
yoffset += buttonHeight + VGAP; yoffset += buttonHeight + VGAP;
return bw; return b;
}; };
// Column 1 // Column 1

View File

@ -196,6 +196,11 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
addBGroupToFocusList(wid); addBGroupToFocusList(wid);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UIDialog::~UIDialog()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void UIDialog::loadConfig() void UIDialog::loadConfig()
{ {

View File

@ -35,7 +35,7 @@ class UIDialog : public Dialog
{ {
public: public:
UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font);
virtual ~UIDialog() = default; virtual ~UIDialog();
private: private:
void loadConfig() override; void loadConfig() override;