Tidy some shared_ptr creation.
authorCarl Hetherington <cth@carlh.net>
Sun, 9 Mar 2025 16:48:51 +0000 (17:48 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 9 Mar 2025 16:48:58 +0000 (17:48 +0100)
src/wx/job_manager_view.cc

index a0a756a930aa8009dfd1d93957b5d3b7ee348a7c..6b72ab0c2e0dcbd0f475bdb7c2712b2c72301a95 100644 (file)
@@ -39,6 +39,7 @@
 
 using std::cout;
 using std::list;
+using std::make_shared;
 using std::map;
 using std::min;
 using std::shared_ptr;
@@ -87,9 +88,9 @@ JobManagerView::job_added(weak_ptr<Job> j)
        if (job) {
                shared_ptr<JobView> v;
                if (_batch) {
-                       v.reset(new BatchJobView(job, this, _panel, _table));
+                       v = make_shared<BatchJobView>(job, this, _panel, _table);
                } else {
-                       v.reset(new NormalJobView(job, this, _panel, _table));
+                       v = make_shared<NormalJobView>(job, this, _panel, _table);
                }
                v->setup();
                _job_records.push_back(v);