From af5b9dfadf8989311cd5f78554349f0283912522 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 8 Aug 2023 15:26:05 +0200 Subject: [PATCH] Cleanup: use some better variable names and tidy ifs. --- src/wx/dcp_panel.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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)); } } -- 2.30.2