mirror of https://github.com/stella-emu/stella.git
A few more unique_ptr instances which I missed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3061 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
1b7635649c
commit
5d927915ab
|
@ -262,10 +262,8 @@ void DebuggerDialog::createFont()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DebuggerDialog::showFatalMessage(const string& msg)
|
||||
{
|
||||
delete myFatalError;
|
||||
myFatalError =
|
||||
new GUI::MessageBox(this, *myLFont, msg, _w/2, _h/2, kDDExitFatalCmd,
|
||||
"Exit ROM", "Continue");
|
||||
myFatalError = make_ptr<GUI::MessageBox>(this, *myLFont, msg, _w/2, _h/2,
|
||||
kDDExitFatalCmd, "Exit ROM", "Continue");
|
||||
myFatalError->show();
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ class DebuggerDialog : public Dialog
|
|||
CartRamWidget* myCartRam;
|
||||
EditTextWidget* myMessageBox;
|
||||
ButtonWidget* myRewindButton;
|
||||
GUI::MessageBox* myFatalError;
|
||||
unique_ptr<GUI::MessageBox> myFatalError;
|
||||
|
||||
unique_ptr<GUI::Font> myLFont; // used for labels
|
||||
unique_ptr<GUI::Font> myNFont; // used for normal text
|
||||
|
|
|
@ -54,7 +54,6 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myQuitButton(nullptr),
|
||||
myList(nullptr),
|
||||
myRomInfoWidget(nullptr),
|
||||
myFirstRunMsg(nullptr),
|
||||
mySelectedItem(0)
|
||||
{
|
||||
const GUI::Font& font = instance().frameBuffer().launcherFont();
|
||||
|
@ -235,8 +234,9 @@ void LauncherDialog::loadConfig()
|
|||
msg.push_back("");
|
||||
msg.push_back("Click 'OK' to select a default ROM directory,");
|
||||
msg.push_back("or 'Cancel' to browse the filesystem manually.");
|
||||
myFirstRunMsg = new GUI::MessageBox(this, instance().frameBuffer().font(),
|
||||
msg, _w, _h, kFirstRunMsgChosenCmd);
|
||||
myFirstRunMsg = make_ptr<GUI::MessageBox>
|
||||
(this, instance().frameBuffer().font(),
|
||||
msg, _w, _h, kFirstRunMsgChosenCmd);
|
||||
}
|
||||
myFirstRunMsg->show();
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ class LauncherDialog : public Dialog
|
|||
unique_ptr<GlobalPropsDialog> myGlobalProps;
|
||||
unique_ptr<LauncherFilterDialog> myFilters;
|
||||
unique_ptr<BrowserDialog> myRomDir;
|
||||
unique_ptr<GUI::MessageBox> myFirstRunMsg;
|
||||
|
||||
ButtonWidget* myStartButton;
|
||||
ButtonWidget* myPrevDirButton;
|
||||
|
@ -113,7 +114,6 @@ class LauncherDialog : public Dialog
|
|||
EditTextWidget* myPattern;
|
||||
|
||||
RomInfoWidget* myRomInfoWidget;
|
||||
GUI::MessageBox* myFirstRunMsg;
|
||||
|
||||
int mySelectedItem;
|
||||
FilesystemNode myCurrentNode;
|
||||
|
|
|
@ -184,10 +184,9 @@ void RomAuditDialog::handleCommand(CommandSender* sender, int cmd,
|
|||
msg.push_back("");
|
||||
msg.push_back("If you're sure you want to proceed with the");
|
||||
msg.push_back("audit, click 'OK', otherwise click 'Cancel'.");
|
||||
myConfirmMsg =
|
||||
new GUI::MessageBox(this, instance().frameBuffer().font(), msg,
|
||||
myMaxWidth, myMaxHeight,
|
||||
kConfirmAuditCmd);
|
||||
myConfirmMsg = make_ptr<GUI::MessageBox>
|
||||
(this, instance().frameBuffer().font(), msg,
|
||||
myMaxWidth, myMaxHeight, kConfirmAuditCmd);
|
||||
}
|
||||
myConfirmMsg->show();
|
||||
break;
|
||||
|
|
|
@ -65,7 +65,7 @@ class RomAuditDialog : public Dialog
|
|||
StaticTextWidget* myResults2;
|
||||
|
||||
// Show a message about the dangers of using this function
|
||||
GUI::MessageBox* myConfirmMsg;
|
||||
unique_ptr<GUI::MessageBox> myConfirmMsg;
|
||||
|
||||
// Maximum width and height for this dialog
|
||||
int myMaxWidth, myMaxHeight;
|
||||
|
|
Loading…
Reference in New Issue