mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
DolphinWX: Remove the need for an explicit new/delete in ISOProperties
Just use a normal constructor call and call Destroy to close the window.
This commit is contained in:
parent
16582a0459
commit
5b649902dc
1 changed files with 3 additions and 4 deletions
|
@ -971,8 +971,7 @@ void CISOProperties::CheckPartitionIntegrity(wxCommandEvent& event)
|
||||||
int PartitionNum = wxAtoi(PartitionName.Mid(PartitionName.find_first_of("0123456789"), 1));
|
int PartitionNum = wxAtoi(PartitionName.Mid(PartitionName.find_first_of("0123456789"), 1));
|
||||||
const WiiPartition& Partition = WiiDisc[PartitionNum];
|
const WiiPartition& Partition = WiiDisc[PartitionNum];
|
||||||
|
|
||||||
wxProgressDialog* dialog = new wxProgressDialog(
|
wxProgressDialog dialog(_("Checking integrity..."), _("Working..."), 1000, this,
|
||||||
_("Checking integrity..."), _("Working..."), 1000, this,
|
|
||||||
wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_SMOOTH
|
wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_SMOOTH
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -981,11 +980,11 @@ void CISOProperties::CheckPartitionIntegrity(wxCommandEvent& event)
|
||||||
|
|
||||||
while (thread.IsAlive())
|
while (thread.IsAlive())
|
||||||
{
|
{
|
||||||
dialog->Pulse();
|
dialog.Pulse();
|
||||||
wxThread::Sleep(50);
|
wxThread::Sleep(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete dialog;
|
dialog.Destroy();
|
||||||
|
|
||||||
if (!thread.Wait())
|
if (!thread.Wait())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue