Now we don't need _cinemas and _screens any more.
authorCarl Hetherington <cth@carlh.net>
Sat, 19 Mar 2022 18:21:19 +0000 (19:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 19 Mar 2022 18:21:19 +0000 (19:21 +0100)
src/wx/screens_panel.cc
src/wx/screens_panel.h

index abddd2826a37c618c2ee5a51ecf9760b5a6ede98..fbff896ca401581ac47104e75faf5a7438cd3714 100644 (file)
@@ -152,7 +152,6 @@ ScreensPanel::add_cinema (shared_ptr<Cinema> cinema, wxTreeListItem previous)
 
        auto id = _targets->InsertItem(_targets->GetRootItem(), previous, std_to_wx(cinema->name));
 
-       _cinemas.push_back(make_pair(id, cinema));
        _item_to_cinema[id] = cinema;
        _cinema_to_item[cinema] = id;
 
@@ -174,7 +173,6 @@ ScreensPanel::add_screen (shared_ptr<Cinema> cinema, shared_ptr<Screen> screen)
 
        auto id = _targets->AppendItem(*item, std_to_wx(screen->name));
 
-       _screens.push_back(make_pair(id, screen));
        _item_to_screen[id] = screen;
        _screen_to_item[screen] = id;
 
@@ -467,8 +465,6 @@ void
 ScreensPanel::search_changed ()
 {
        _targets->DeleteAllItems ();
-       _cinemas.clear ();
-       _screens.clear ();
 
        _item_to_cinema.clear ();
        _cinema_to_item.clear ();
index bf68870a6f5f71fa03b103b75f3d2431fa7dd552..e3c7023df844bd93fbeac760d383d6e07daad4d3 100644 (file)
@@ -70,9 +70,6 @@ private:
        void setup_cinema_checked_state (wxTreeListItem screen);
        int compare (std::string const& utf8_a, std::string const& utf8_b);
 
-       typedef std::vector<std::pair<wxTreeListItem, std::shared_ptr<Cinema>>> Cinemas;
-       typedef std::vector<std::pair<wxTreeListItem, std::shared_ptr<dcpomatic::Screen>>> Screens;
-
        std::shared_ptr<Cinema> item_to_cinema (wxTreeListItem item) const;
        std::shared_ptr<dcpomatic::Screen> item_to_screen (wxTreeListItem item) const;
        boost::optional<wxTreeListItem> cinema_to_item (std::shared_ptr<Cinema> cinema) const;
@@ -87,9 +84,6 @@ private:
        wxButton* _edit_screen;
        wxButton* _remove_screen;
 
-       Cinemas _cinemas;
-       Screens _screens;
-
        /* We want to be able to search (and so remove selected things from the view)
         * but not deselect them, so we maintain lists of selected cinemas and screens.
         */