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

@ -37,20 +37,20 @@ CommandDialog::CommandDialog(OSystem& osystem, DialogContainer& parent)
const int buttonWidth = _font.getStringWidth("Stella Palette") + 16,
buttonHeight = _font.getLineHeight() + 6,
rowHeight = buttonHeight + VGAP;
// Set real dimensions
_w = 3 * (buttonWidth + 5) + HBORDER * 2;
_h = 6 * rowHeight - VGAP + VBORDER * 2 + _th;
ButtonWidget* bw;
ButtonWidget* bw = nullptr;
WidgetArray wid;
int xoffset = HBORDER, yoffset = VBORDER + _th;
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);
yoffset += buttonHeight + VGAP;
return bw;
return b;
};
// Column 1

View File

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

View File

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