Small bits of tidying up.
authorCarl Hetherington <cth@carlh.net>
Tue, 16 Jul 2013 12:52:16 +0000 (13:52 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Jul 2013 12:52:16 +0000 (13:52 +0100)
src/lib/filter_graph.cc
src/lib/job_manager.cc
src/lib/job_manager.h
src/lib/util.cc
src/lib/util.h
src/lib/video_content.cc
src/lib/video_content.h
src/tools/dcpomatic.cc
src/wx/film_editor.cc
src/wx/film_editor.h
src/wx/wx_util.cc

index 7c4df8903e18e48d11abbef510b8c5ca548f4a2d..a3bb0093edb1e7a84896d8286b04840962f246d4 100644 (file)
@@ -85,9 +85,7 @@ FilterGraph::FilterGraph (shared_ptr<const FFmpegContent> content, libdcp::Size
          << "time_base=1/1:"
          << "pixel_aspect=1/1";
 
-       int r;
-
-       if ((r = avfilter_graph_create_filter (&_buffer_src_context, buffer_src, "in", a.str().c_str(), 0, graph)) < 0) {
+       if (avfilter_graph_create_filter (&_buffer_src_context, buffer_src, "in", a.str().c_str(), 0, graph) < 0) {
                throw DecodeError (N_("could not create buffer source"));
        }
 
index f962754677c2c1c672092838a0eca23f73e5873f..2d216dacb947e58c45b3fd6391858d59f9869dae 100644 (file)
@@ -48,16 +48,6 @@ JobManager::add (shared_ptr<Job> j)
        return j;
 }
 
-void
-JobManager::add_after (shared_ptr<Job> after, shared_ptr<Job> j)
-{
-       boost::mutex::scoped_lock lm (_mutex);
-       list<shared_ptr<Job> >::iterator i = find (_jobs.begin(), _jobs.end(), after);
-       assert (i != _jobs.end ());
-       ++i;
-       _jobs.insert (i, j);
-}
-
 list<shared_ptr<Job> >
 JobManager::get () const
 {
index 82095a143b66ec04c9ed8ee7e658bf136eaa256a..9c107c19017c82a199499b93f065e3c4ab147b0a 100644 (file)
@@ -35,7 +35,6 @@ class JobManager
 public:
 
        boost::shared_ptr<Job> add (boost::shared_ptr<Job>);
-       void add_after (boost::shared_ptr<Job> after, boost::shared_ptr<Job> j);
        std::list<boost::shared_ptr<Job> > get () const;
        bool work_to_do () const;
        bool errors () const;
index 305aae4f8211a500104b2b034609915390a267fe..ec99b2f8994724c5bdcdd30b6480f83ef413d4f5 100644 (file)
@@ -119,12 +119,6 @@ seconds_to_hms (int s)
        return hms.str ();
 }
 
-string
-time_to_hms (Time t)
-{
-       return seconds_to_hms (t / TIME_HZ);
-}
-
 /** @param s Number of seconds.
  *  @return String containing an approximate description of s (e.g. "about 2 hours")
  */
@@ -207,15 +201,11 @@ void
 stacktrace (ostream& out, int levels)
 {
        void *array[200];
-       size_t size;
-       char **strings;
-       size_t i;
-     
-       size = backtrace (array, 200);
-       strings = backtrace_symbols (array, size);
+       size_t size = backtrace (array, 200);
+       char** strings = backtrace_symbols (array, size);
      
        if (strings) {
-               for (i = 0; i < size && (levels == 0 || i < size_t(levels)); i++) {
+               for (size_t i = 0; i < size && (levels == 0 || i < size_t(levels)); i++) {
                        out << N_("  ") << demangle (strings[i]) << "\n";
                }
                
@@ -565,12 +555,6 @@ stride_round_up (int c, int const * stride, int t)
        return a - (a % t);
 }
 
-int
-stride_lookup (int c, int const * stride)
-{
-       return stride[c];
-}
-
 /** Read a sequence of key / value pairs from a text stream;
  *  the keys are the first words on the line, and the values are
  *  the remainder of the line following the key.  Lines beginning
index d9c88293e4c9069d61cf500b7140a9ff28385ed0..5187dddcf40d899cbc0cde5da24529274db84675 100644 (file)
@@ -55,7 +55,6 @@ class Scaler;
 class Film;
 
 extern std::string seconds_to_hms (int);
-extern std::string time_to_hms (Time);
 extern std::string seconds_to_approximate_hms (int);
 extern void stacktrace (std::ostream &, int);
 extern std::string dependency_version_summary ();
@@ -108,7 +107,6 @@ struct FrameRateConversion
 
 extern int dcp_audio_frame_rate (int);
 extern int stride_round_up (int, int const *, int);
-extern int stride_lookup (int c, int const * stride);
 extern std::multimap<std::string, std::string> read_key_value (std::istream& s);
 extern int get_required_int (std::multimap<std::string, std::string> const & kv, std::string k);
 extern float get_required_float (std::multimap<std::string, std::string> const & kv, std::string k);
index c1f4d0089d8fab807b74d1fae14c8125ac6426f0..819333227a6e42c4a52d41a807cb338ddce45f48 100644 (file)
@@ -137,16 +137,6 @@ VideoContent::information () const
        return s.str ();
 }
 
-void
-VideoContent::set_crop (Crop c)
-{
-       {
-               boost::mutex::scoped_lock lm (_mutex);
-               _crop = c;
-       }
-       signal_changed (VideoContentProperty::VIDEO_CROP);
-}
-
 void
 VideoContent::set_left_crop (int c)
 {
index 697a0ecc3415b200a745800c76a89e062d98d36c..d74242ae9c46779801bd4a8415d509610725f8ca 100644 (file)
@@ -63,7 +63,6 @@ public:
                return _video_frame_rate;
        }
 
-       void set_crop (Crop);
        void set_left_crop (int);
        void set_right_crop (int);
        void set_top_crop (int);
index f9a03d8b09feda2a5f05c8d07d397a04ea2f05e2..5fc61557e8676d8712affb60feae7b4de68d4c66 100644 (file)
@@ -89,7 +89,10 @@ public:
                return _dialog->ShowModal ();
        }
 
-private:       
+private:
+       /* Not defined */
+       FilmChangedDialog (FilmChangedDialog const &);
+       
        wxMessageDialog* _dialog;
 };
 
@@ -199,13 +202,6 @@ setup_menu (wxMenuBar* m)
        m->Append (help, _("&Help"));
 }
 
-bool
-window_closed (wxCommandEvent &)
-{
-       maybe_save_then_delete_film ();
-       return false;
-}
-
 class Frame : public wxFrame
 {
 public:
index f305c7c2613bce2910f309cf67a2f399d808f0f4..3e116c209abb5dc262734ca1ed2051c0b3625272 100644 (file)
@@ -968,20 +968,6 @@ FilmEditor::audio_delay_changed (wxCommandEvent &)
        ac->set_audio_delay (_audio_delay->GetValue ());
 }
 
-void
-FilmEditor::setup_main_notebook_size ()
-{
-       _main_notebook->InvalidateBestSize ();
-
-       _content_sizer->Layout ();
-       _content_sizer->SetSizeHints (_content_panel);
-       _dcp_sizer->Layout ();
-       _dcp_sizer->SetSizeHints (_dcp_panel);
-
-       _main_notebook->Fit ();
-       Fit ();
-}
-
 void
 FilmEditor::audio_gain_calculate_button_clicked (wxCommandEvent &)
 {
index f2aaae04d62d02c722067d2d134ffdfd57930cdc..f2c6745dedc6733e4cb692b2009055ce74a79cfc 100644 (file)
@@ -108,7 +108,6 @@ private:
        void setup_dcp_name ();
        void setup_show_audio_sensitivity ();
        void setup_scaling_description ();
-       void setup_main_notebook_size ();
        void setup_content ();
        void setup_container ();
        void setup_content_sensitivity ();
index 1a15b0e9875f91444489ffdb4903b9b848d239b3..64418dac04aa9f3fdd65de8cabcfde4a0fd8c6dd 100644 (file)
@@ -265,7 +265,6 @@ dcpomatic_setup_i18n ()
                if (!locale->IsOk()) {
                        delete locale;
                        locale = new wxLocale (wxLANGUAGE_ENGLISH);
-                       language = wxLANGUAGE_ENGLISH;
                }
        }