Rename CheckContentChangeJob -> CheckContentJob.
[dcpomatic.git] / src / tools / dcpomatic.cc
index 8455163bb608970691441b689b98df902cd4232a..ebcd05a682770c20677d4ca1db22b893d3567303 100644 (file)
@@ -56,7 +56,7 @@
 #include "wx/wx_util.h"
 #include "lib/analytics.h"
 #include "lib/audio_content.h"
-#include "lib/check_content_change_job.h"
+#include "lib/check_content_job.h"
 #include "lib/cinema.h"
 #include "lib/compose.hpp"
 #include "lib/config.h"
@@ -389,7 +389,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 */
@@ -411,9 +411,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 ()
@@ -459,7 +458,7 @@ public:
 
                set_film (film);
 
-               JobManager::instance()->add(shared_ptr<Job>(new CheckContentChangeJob(film)));
+               JobManager::instance()->add(make_shared<CheckContentJob>(film));
        }
        catch (FileNotFoundError& e) {
                auto const dir = e.file().parent_path();