- _allow_any_dcp_frame_rate = new CheckBox(_panel, _("Allow any DCP frame rate"));
- table->Add(_allow_any_dcp_frame_rate, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
- table->AddSpacer(0);
+ auto checkbox = [this, table](wxString name, CheckBox*& variable) {
+ variable = new CheckBox(_panel, name);
+ table->Add(variable, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+ table->AddSpacer(0);
+ };
+
+ checkbox(_("Allow any DCP frame rate"), _allow_any_dcp_frame_rate);