From: Carl Hetherington Date: Tue, 8 Aug 2023 13:26:05 +0000 (+0200) Subject: Cleanup: use some better variable names and tidy ifs. X-Git-Tag: v2.16.61~12 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=af5b9dfadf8989311cd5f78554349f0283912522 Cleanup: use some better variable names and tidy ifs. --- diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index 4da8abe36..7fc6f00df 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -588,11 +588,10 @@ DCPPanel::container_changed () return; } - auto const n = _container->get(); - if (n) { + if (auto const container = _container->get()) { auto ratios = Ratio::containers (); - DCPOMATIC_ASSERT(*n < int(ratios.size())); - _film->set_container(ratios[*n]); + DCPOMATIC_ASSERT(*container < int(ratios.size())); + _film->set_container(ratios[*container]); } } @@ -605,9 +604,8 @@ DCPPanel::dcp_content_type_changed () return; } - auto n = _dcp_content_type->get(); - if (n) { - _film->set_dcp_content_type(DCPContentType::from_index(*n)); + if (auto const type = _dcp_content_type->get()) { + _film->set_dcp_content_type(DCPContentType::from_index(*type)); } }