Compress an if.
authorCarl Hetherington <cth@carlh.net>
Sun, 9 Mar 2025 16:49:03 +0000 (17:49 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 9 Mar 2025 16:49:03 +0000 (17:49 +0100)
src/wx/job_manager_view.cc

index 6b72ab0c2e0dcbd0f475bdb7c2712b2c72301a95..9c3c29baa4413e3fa417d32819b6e956dd60623e 100644 (file)
@@ -84,8 +84,7 @@ JobManagerView::JobManagerView(wxWindow* parent, bool batch)
 void
 JobManagerView::job_added(weak_ptr<Job> j)
 {
-       auto job = j.lock();
-       if (job) {
+       if (auto job = j.lock()) {
                shared_ptr<JobView> v;
                if (_batch) {
                        v = make_shared<BatchJobView>(job, this, _panel, _table);