diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-10-11 19:55:06 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-10-11 20:13:21 +0200 |
| commit | 44b69f2d9affb048c3d166e3a62bf3462dd5c8b5 (patch) | |
| tree | 7cf2a540d01c66f9a7d12acfdabd0ee2f4251c80 /src/tools/dcpomatic.cc | |
| parent | 805d4a48fa6e4d8e28fd582a2ae6ba78b8343144 (diff) | |
Replace some raw arrays with std::vectors.
Diffstat (limited to 'src/tools/dcpomatic.cc')
| -rw-r--r-- | src/tools/dcpomatic.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 0b7f632e1..2cc3187d6 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -387,7 +387,7 @@ public: #else int accelerators = 6; #endif - auto accel = new wxAcceleratorEntry[accelerators]; + std::vector<wxAcceleratorEntry> accel(accelerators); /* [Shortcut] Ctrl+A:Add file(s) to the film */ accel[0].Set (wxACCEL_CTRL, static_cast<int>('A'), ID_add_file); /* [Shortcut] Delete:Remove selected content from film */ @@ -409,9 +409,8 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::timeline_pressed, this), ID_timeline); Bind (wxEVT_MENU, boost::bind (&DOMFrame::back_frame, this), ID_back_frame); Bind (wxEVT_MENU, boost::bind (&DOMFrame::forward_frame, this), ID_forward_frame); - wxAcceleratorTable accel_table (accelerators, accel); + wxAcceleratorTable accel_table (accelerators, accel.data()); SetAcceleratorTable (accel_table); - delete[] accel; } void remove_accelerators () |
