diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-08-08 15:26:05 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-08-09 00:42:59 +0200 |
| commit | af5b9dfadf8989311cd5f78554349f0283912522 (patch) | |
| tree | 6c763a44b6d459f614705c78e681ba8d5f0b1d35 /src | |
| parent | 8cb1cf6a5577fcb75d210006abe334be755973a0 (diff) | |
Cleanup: use some better variable names and tidy ifs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/dcp_panel.cc | 12 |
1 files 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)); } } |
