summaryrefslogtreecommitdiff
path: root/src/wx/content_menu.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-14 22:06:05 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-14 22:06:05 +0100
commit4e4968464eeef1956cb82392e1fc3b27a792ab89 (patch)
tree79db245f320df21a075a0fd26de685e02fff6924 /src/wx/content_menu.cc
parent0ecea9f4d1a772e99f396e47364e68abfbfe9f7f (diff)
Add wx_ptr and use it instead of ScopeGuard in a lot of places.
Diffstat (limited to 'src/wx/content_menu.cc')
-rw-r--r--src/wx/content_menu.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc
index 80976e5f6..5957ac06d 100644
--- a/src/wx/content_menu.cc
+++ b/src/wx/content_menu.cc
@@ -27,6 +27,7 @@
#include "repeat_dialog.h"
#include "timeline_video_content_view.h"
#include "timeline_audio_content_view.h"
+#include "wx_ptr.h"
#include "wx_util.h"
#include "lib/audio_content.h"
#include "lib/config.h"
@@ -44,7 +45,6 @@
#include "lib/image_content.h"
#include "lib/job_manager.h"
#include "lib/playlist.h"
-#include "lib/scope_guard.h"
#include "lib/video_content.h"
#include <dcp/cpl.h>
#include <dcp/decrypted_kdm.h>
@@ -466,8 +466,7 @@ ContentMenu::advanced ()
DCPOMATIC_ASSERT(!_content.empty());
auto content = _content.front();
- auto dialog = new ContentAdvancedDialog(_parent, content);
- ScopeGuard sg = [dialog]() { dialog->Destroy(); };
+ auto dialog = make_wx<ContentAdvancedDialog>(_parent, content);
if (dialog->ShowModal() == wxID_CANCEL) {
return;