Use enum class for Film::Property.
[dcpomatic.git] / src / wx / audio_dialog.cc
index b8c7f7b7343b23af4b08f62361d68dd6747606cd..c27d9f06137ae20b523620f122ee5d47183d73b0 100644 (file)
@@ -101,7 +101,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, weak_ptr<Film
        wxBoxSizer* right = new wxBoxSizer (wxVERTICAL);
 
        {
-               wxStaticText* m = new StaticText (this, _("Channels"));
+               auto m = new StaticText (this, _("Channels"));
                m->SetFont (subheading_font);
                right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 16);
        }
@@ -116,7 +116,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, weak_ptr<Film
        show_or_hide_channel_checkboxes ();
 
        {
-               wxStaticText* m = new StaticText (this, _("Type"));
+               auto m = new StaticText (this, _("Type"));
                m->SetFont (subheading_font);
                right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
        }
@@ -133,7 +133,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, weak_ptr<Film
        }
 
        {
-               wxStaticText* m = new StaticText (this, _("Smoothing"));
+               auto m = new StaticText (this, _("Smoothing"));
                m->SetFont (subheading_font);
                right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
        }
@@ -312,13 +312,13 @@ AudioDialog::channel_clicked (wxCommandEvent& ev)
 }
 
 void
-AudioDialog::film_change (ChangeType type, int p)
+AudioDialog::film_change (ChangeType type, Film::Property p)
 {
        if (type != ChangeType::DONE) {
                return;
        }
 
-       if (p == Film::AUDIO_CHANNELS) {
+       if (p == Film::Property::AUDIO_CHANNELS) {
                auto film = _film.lock ();
                if (film) {
                        _channels = film->audio_channels ();