Fix a bunch of warnings.
authorDavid Robillard <d@drobilla.net>
Thu, 26 Feb 2009 00:58:35 +0000 (00:58 +0000)
committerDavid Robillard <d@drobilla.net>
Thu, 26 Feb 2009 00:58:35 +0000 (00:58 +0000)
Clean up.

git-svn-id: svn://localhost/ardour2/branches/3.0@4668 d708f5d6-7413-0410-9779-e7cbd77b26cf

28 files changed:
gtk2_ardour/analysis_window.h
gtk2_ardour/audio_region_view.cc
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/canvas-note-event.h
gtk2_ardour/canvas-waveview.c
gtk2_ardour/fft_graph.h
gtk2_ardour/fft_result.h
gtk2_ardour/gtk-custom-hruler.c
gtk2_ardour/gtk-custom-ruler.c
gtk2_ardour/midi_channel_selector.cc
gtk2_ardour/midi_channel_selector.h
gtk2_ardour/midi_region_view.cc
gtk2_ardour/panner2d.cc
gtk2_ardour/plugin_selector.cc
gtk2_ardour/region_selection.cc
gtk2_ardour/region_view.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/time_axis_view_item.cc
libs/ardour/ardour/plugin.h
libs/ardour/ardour/tempo.h
libs/ardour/export_format_specification.cc
libs/ardour/export_utilities.cc
libs/ardour/io.cc
libs/ardour/midi_port.cc
libs/ardour/panner.cc
libs/ardour/plugin.cc
libs/ardour/smf_source.cc
libs/gtkmm2ext/gtk_ui.cc

index 45752c4a34a6886d4aa15f9e14d312d3a463d4eb..185774225b57c5e1694a82f63951bc889c0a0db0 100644 (file)
 
 class AnalysisWindow : public Gtk::Window
 {
-  public:
-         AnalysisWindow  ();
-         ~AnalysisWindow ();
+public:
+       AnalysisWindow  ();
+       ~AnalysisWindow ();
 
-         void set_rangemode();
-         void set_regionmode();
-         
-         void track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
+       void set_rangemode();
+       void set_regionmode();
 
-         void analyze ();
+       void track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
 
-         const void set_session(ARDOUR::Session *session) { _session = session; };
+       void analyze ();
 
-  private:
-         
-         ARDOUR::Session *_session;
+       void set_session(ARDOUR::Session *session) { _session = session; };
 
-         void clear_tracklist();
+private:
 
-         void source_selection_changed (Gtk::RadioButton *);
-         void display_model_changed    (Gtk::RadioButton *);
-         void show_minmax_changed      ();
-         void show_normalized_changed  ();
+       ARDOUR::Session *_session;
 
-         void analyze_data                             (Gtk::Button *);
-         
-         struct TrackListColumns : public Gtk::TreeModel::ColumnRecord {
-                 public:
-                 TrackListColumns () {
-                               add (trackname);
+       void clear_tracklist();
+
+       void source_selection_changed (Gtk::RadioButton *);
+       void display_model_changed    (Gtk::RadioButton *);
+       void show_minmax_changed        ();
+       void show_normalized_changed    ();
+
+       void analyze_data                               (Gtk::Button *);
+
+       struct TrackListColumns : public Gtk::TreeModel::ColumnRecord {
+               public:
+                       TrackListColumns () {
+                               add (trackname);
                                add (visible);
                                add (color);
                                add (graph);
-                 }
-                 Gtk::TreeModelColumn<std::string> trackname;
-                 Gtk::TreeModelColumn<bool>        visible;
-          Gtk::TreeModelColumn<Gdk::Color>  color;
-                 Gtk::TreeModelColumn<FFTResult *>  graph;
-         };
-
-         // Packing essentials
-         Gtk::HBox hbox;
-         Gtk::VBox vbox;
-         
-         // Left  side
-         Glib::RefPtr<Gtk::ListStore> tlmodel;
-         TrackListColumns tlcols;
-         Gtk::TreeView track_list;
-         
-         Gtk::Label source_selection_label;
-
-
-         Gtk::RadioButton source_selection_ranges_rb;
-         Gtk::RadioButton source_selection_regions_rb;
-
-         Gtk::HSeparator hseparator1;
-         
-         Gtk::Label display_model_label;
-         Gtk::RadioButton display_model_composite_separate_rb;
-         Gtk::RadioButton display_model_composite_all_tracks_rb;
-         
-         Gtk::Button refresh_button;
-
-
-         Gtk::CheckButton show_minmax_button;
-         Gtk::CheckButton show_normalized_button;
-
-         
-         
-         // The graph
-         FFTGraph fft_graph;
-
-         bool track_list_ready;
-         Glib::Mutex track_list_lock;
-
-         friend class FFTGraph;
+                       }
+                       Gtk::TreeModelColumn<std::string> trackname;
+                       Gtk::TreeModelColumn<bool>        visible;
+                       Gtk::TreeModelColumn<Gdk::Color>  color;
+                       Gtk::TreeModelColumn<FFTResult *>  graph;
+       };
+
+       // Packing essentials
+       Gtk::HBox hbox;
+       Gtk::VBox vbox;
+
+       // Left  side
+       Glib::RefPtr<Gtk::ListStore> tlmodel;
+       TrackListColumns tlcols;
+       Gtk::TreeView track_list;
+
+       Gtk::Label source_selection_label;
+
+
+       Gtk::RadioButton source_selection_ranges_rb;
+       Gtk::RadioButton source_selection_regions_rb;
+
+       Gtk::HSeparator hseparator1;
+
+       Gtk::Label display_model_label;
+       Gtk::RadioButton display_model_composite_separate_rb;
+       Gtk::RadioButton display_model_composite_all_tracks_rb;
+
+       Gtk::Button refresh_button;
+
+
+       Gtk::CheckButton show_minmax_button;
+       Gtk::CheckButton show_normalized_button;
+
+
+       // The graph
+       FFTGraph fft_graph;
+
+       bool track_list_ready;
+       Glib::Mutex track_list_lock;
+
+       friend class FFTGraph;
 };
 
 #endif // __ardour_analysis_window_h
index 17de6517acdeb21617fc179605e1f0a1667bcaa4..df44b3a4aa4498482811b1b223f2dfc524a26e75 100644 (file)
@@ -99,7 +99,8 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView
 
 
 AudioRegionView::AudioRegionView (const AudioRegionView& other)
-       : RegionView (other)
+       : sigc::trackable(other)
+       , RegionView (other)
        , zero_line(0)
        , fade_in_shape(0)
        , fade_out_shape(0)
index 5d6b48850e9bd69706ec249b8f35ef0851554489..bd0da7caf812b137fb6acb1e500bcaf22a4841e3 100644 (file)
@@ -733,7 +733,7 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float ti
        AutomationSelection::iterator p;
        boost::shared_ptr<AutomationList> alist(line.the_list());
        
-       for (p = selection.lines.begin(); p != selection.lines.end() && nth; ++p, --nth);
+       for (p = selection.lines.begin(); p != selection.lines.end() && nth; ++p, --nth) {}
 
        if (p == selection.lines.end()) {
                return false;
index 75747bc288d32e7577c664597b7a1b157e87093e..86f7312d1755d40ed3fa55967f5b3007a1016cf5 100644 (file)
@@ -49,7 +49,7 @@ namespace Canvas {
  *
  * A newer, better canvas should remove the need for all the ugly here.
  */
-class CanvasNoteEvent : public sigc::trackable, public InteractiveItem {
+class CanvasNoteEvent : virtual public sigc::trackable, public InteractiveItem {
 public:
        typedef Evoral::Note<double> NoteType;
        CanvasNoteEvent(
index f929b3119759618a2213d38928de5ad9192e8e79..5c670440848a5d4fce6afaa89afacc573e02714b 100644 (file)
@@ -919,61 +919,62 @@ gnome_canvas_waveview_set_property (GObject      *object,
 }
 
 static void
-gnome_canvas_waveview_get_property (GObject      *object,
-                                   guint         prop_id,
-                                   GValue       *value,
-                                   GParamSpec   *pspec)
+gnome_canvas_waveview_get_property (
+               GObject      *object,
+               guint         prop_id,
+               GValue       *value,
+               GParamSpec   *pspec)
 {
        
    
        g_return_if_fail (object != NULL);
-        g_return_if_fail (GNOME_IS_CANVAS_WAVEVIEW (object));
+       g_return_if_fail (GNOME_IS_CANVAS_WAVEVIEW (object));
 
        GnomeCanvasWaveView *waveview = GNOME_CANVAS_WAVEVIEW (object);
 
        switch (prop_id) {
        case PROP_DATA_SRC:
-               g_value_set_pointer(value, waveview->data_src);
+               g_value_set_pointer(value, waveview->data_src);
                break;
 
        case PROP_CHANNEL:
-               g_value_set_uint(value, waveview->channel);
+               g_value_set_uint(value, waveview->channel);
                break;
 
        case PROP_LENGTH_FUNCTION:
-               g_value_set_pointer(value, waveview->length_function);
+               g_value_set_pointer(value, waveview->length_function);
                break;
 
        case PROP_SOURCEFILE_LENGTH_FUNCTION:
-               g_value_set_pointer(value, waveview->sourcefile_length_function);
+               g_value_set_pointer(value, waveview->sourcefile_length_function);
                break;
 
        case PROP_PEAK_FUNCTION:
-               g_value_set_pointer(value, waveview->peak_function);
+               g_value_set_pointer(value, waveview->peak_function);
                break;
 
        case PROP_GAIN_FUNCTION:
-               g_value_set_pointer(value, waveview->gain_curve_function);
+               g_value_set_pointer(value, waveview->gain_curve_function);
                break;
 
        case PROP_GAIN_SRC:
-               g_value_set_pointer(value, waveview->gain_src);
+               g_value_set_pointer(value, waveview->gain_src);
                break;
 
        case PROP_CACHE:
-               g_value_set_pointer(value, waveview->cache);
+               g_value_set_pointer(value, waveview->cache);
                break;
 
        case PROP_CACHE_UPDATER:
-               g_value_set_boolean(value, waveview->cache_updater);
+               g_value_set_boolean(value, waveview->cache_updater);
                break;
 
        case PROP_SAMPLES_PER_UNIT:
-               g_value_set_double(value, waveview->samples_per_unit);
+               g_value_set_double(value, waveview->samples_per_unit);
                break;
 
        case PROP_AMPLITUDE_ABOVE_AXIS:
-               g_value_set_double(value, waveview->amplitude_above_axis);
+               g_value_set_double(value, waveview->amplitude_above_axis);
                break;
 
        case PROP_X:
index ea91a08ea96b2ff9c538c537e2c8714eb9b8a918..50a2df1fda896b638d3594d1e6c73a0879fc1e56 100644 (file)
@@ -54,8 +54,8 @@ class FFTGraph : public Gtk::DrawingArea
                void on_size_allocate(Gtk::Allocation & alloc);
                FFTResult *prepareResult(Gdk::Color color, std::string trackname);
                
-               const void set_show_minmax     (bool v) { _show_minmax     = v; redraw(); };
-               const void set_show_normalized (bool v) { _show_normalized = v; redraw(); };
+               void set_show_minmax     (bool v) { _show_minmax     = v; redraw(); }
+               void set_show_normalized (bool v) { _show_normalized = v; redraw(); }
 
        private:
 
index fa2a56910865707f89ba6ad89401a6d8003a647a..2042b2d0429ae25bb946a20b7228f9b6c84bfc73 100644 (file)
@@ -39,16 +39,16 @@ class FFTResult
                void analyzeWindow(float *window);
                void finalize();
 
-               const int length() { return _dataSize; }
+               int length() const { return _dataSize; }
 
                float avgAt(int x);
                float maxAt(int x);
                float minAt(int x);
                
-               const float minimum() { return _minimum; }
-               const float maximum() { return _maximum; }
+               float minimum() const { return _minimum; }
+               float maximum() const { return _maximum; }
                
-               const Gdk::Color get_color() { return _color; }
+               Gdk::Color get_color() const { return _color; }
                
        private:
                FFTResult(FFTGraph *graph, Gdk::Color color, std::string trackname);
index f0bbb9152e97b8c8a3b1d28ffde00b32822e6d09..1446fb487f15479922ff0d6f6839bb7a6a6e87f1 100644 (file)
@@ -48,8 +48,7 @@ GType gtk_custom_hruler_get_type (void)
 {
        static GType hruler_type = 0;
        
-       if (!hruler_type)
-       {
+       if (!hruler_type) {
                static const GTypeInfo hruler_info =
                        {
                                sizeof (GtkCustomHRulerClass),
@@ -61,6 +60,7 @@ GType gtk_custom_hruler_get_type (void)
                                sizeof (GtkCustomHRuler),
                                0,              /* n_preallocs */
                                (GInstanceInitFunc) gtk_custom_hruler_init,
+                               NULL /* value_table */
                        };
                
                hruler_type = g_type_register_static (gtk_custom_ruler_get_type(), "GtkCustomHRuler",
index 0e7ceb5875b3dc360874eea9831bee75e4058e9b..c795e46201287e87492b4c3ecd69d34a9b4efd83 100644 (file)
@@ -89,6 +89,7 @@ GType gtk_custom_ruler_get_type (void)
                                sizeof (GtkCustomRuler),
                                0,              /* n_preallocs */
                                (GInstanceInitFunc) gtk_custom_ruler_init,
+                               NULL                    /* value_table */
                        };
                
                ruler_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkCustomRuler",
index 12eea5bb12efb1913e3f4704e91b70e6431cda28..030a0608ef425870eb3a6e74b3b69c1b429f779e 100644 (file)
@@ -181,7 +181,7 @@ MidiMultipleChannelSelector::set_channel_mode(ChannelMode mode, uint16_t mask)
        }
 }
 
-const uint16_t 
+uint16_t 
 MidiMultipleChannelSelector::get_selected_channels() const 
 { 
        uint16_t selected_channels = 0;
index a2b6247c753084e62cbd3fe8a9921ad0646798a8..f604d0ccd33f4e4929ad47dc92607fc58d705046 100644 (file)
@@ -53,7 +53,7 @@ class SingleMidiChannelSelector : public MidiChannelSelector
 public:
        SingleMidiChannelSelector(uint8_t active_channel = 0);
        
-       const uint8_t get_active_channel() const { return _active_channel; }
+       uint8_t get_active_channel() const { return _active_channel; }
        
        sigc::signal<void, uint8_t> channel_selected;
        
@@ -79,8 +79,8 @@ public:
         *         bit 0 represents channel 0 and bit 15 represents channel 15
         *          
         */
-       const uint16_t get_selected_channels() const;
-       void           set_selected_channels(uint16_t selected_channels);
+       uint16_t get_selected_channels() const;
+       void     set_selected_channels(uint16_t selected_channels);
        
 protected:
        ARDOUR::ChannelMode _channel_mode;
index 2ea8316b37b042abb58abd96c1b702af3ba80b42..4a5c2091017f40c6d133630734d0fab4b0c58a3c 100644 (file)
@@ -105,7 +105,8 @@ MidiRegionView::MidiRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &
 
 
 MidiRegionView::MidiRegionView (const MidiRegionView& other)
-       : RegionView (other)
+       : sigc::trackable(other)
+       , RegionView (other)
        , _force_channel(-1)
        , _last_channel_selection(0xFFFF)
        , _default_note_length(1.0)
index 7a081101f6979c50660f4b8c7dbd09ebc5a42a88..0f4655221e02c1d1825afe47ba6b71832d40ff28 100644 (file)
@@ -118,6 +118,8 @@ Panner2d::reset (uint32_t n_inputs)
                
        case 2:
                pucks[0]->set_text ("R");
+               assert(existing_pucks >= 0);
+               // FIXME: Impossible (unsigned)
                if (existing_pucks < 0) {
                        pucks[0]->x.set_value (0.5f);
                        pucks[1]->y.set_value (0.25f);
index ac9e785522487b056cd9ffa4579087c76474e6d2..9398661d706cf16f4417a178004a627e4c3ea711 100644 (file)
@@ -281,7 +281,7 @@ PluginSelector::refiller (const PluginInfoList& plugs, const::std::string& filte
 
                        newrow[plugin_columns.creator] = creator;
 
-                       if ((*i)->n_inputs.n_total() < 0) {
+                       if ((*i)->n_inputs.n_total() < 0) { // FIXME: Impossible (unsigned)
                                newrow[plugin_columns.audio_ins] = "various";
                                newrow[plugin_columns.midi_ins] = "various";
                        } else {
@@ -290,7 +290,8 @@ PluginSelector::refiller (const PluginInfoList& plugs, const::std::string& filte
                                snprintf (buf, sizeof(buf), "%d", (*i)->n_inputs.n_midi());
                                newrow[plugin_columns.midi_ins] = buf;
                        }
-                       if ((*i)->n_outputs.n_total() < 0) {
+
+                       if ((*i)->n_outputs.n_total() < 0) { // FIXME: Impossible (unsigned)
                                newrow[plugin_columns.audio_outs] = "various";
                                newrow[plugin_columns.midi_outs] = "various";
                        } else {
index 76dfe331074b4755c8775e2b431d540610de64c8..ac8a783a419ba8b061f5d8a1cf9c7179ab4cf42a 100644 (file)
@@ -28,10 +28,8 @@ using namespace ARDOUR;
 using namespace PBD;
 using namespace sigc;
 
-/**
- *  Construct an empty RegionSelection.
+/** Construct an empty RegionSelection.
  */
-
 RegionSelection::RegionSelection ()
 {
        RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
@@ -40,12 +38,12 @@ RegionSelection::RegionSelection ()
        _current_end = 0;
 }
 
-/**
- *  Copy constructor.
+/** Copy constructor.
  *  @param other RegionSelection to copy.
  */
-
 RegionSelection::RegionSelection (const RegionSelection& other)
+       : std::list<RegionView*>()
+       , sigc::trackable(other)
 {
        RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
 
@@ -56,11 +54,9 @@ RegionSelection::RegionSelection (const RegionSelection& other)
        _current_end = other._current_end;
 }
 
-/**
- *  operator= to set a RegionSelection to be the same as another.
+/** operator= to set a RegionSelection to be the same as another.
  *  @param other Other RegionSelection.
  */
-
 RegionSelection&
 RegionSelection::operator= (const RegionSelection& other)
 {
@@ -79,10 +75,8 @@ RegionSelection::operator= (const RegionSelection& other)
        return *this;
 }
 
-/**
- *  Empty this RegionSelection.
+/** Empty this RegionSelection.
  */
-
 void
 RegionSelection::clear_all()
 {
@@ -96,18 +90,15 @@ RegionSelection::clear_all()
  *  @param rv RegionView.
  *  @return true if this selection contains rv.
  */
-
 bool RegionSelection::contains (RegionView* rv) const
 {
        return find (begin(), end(), rv) != end();
 }
 
-/**
- *  Add a region to the selection.
+/** Add a region to the selection.
  *  @param rv Region to add.
  *  @return false if we already had the region, otherwise true.
  */
-
 bool
 RegionSelection::add (RegionView* rv)
 {
@@ -133,23 +124,19 @@ RegionSelection::add (RegionView* rv)
        return true;
 }
 
-/**
- *  Remove a region from the selection.
+/** Remove a region from the selection.
  *  @param rv Region to remove.
  */
-
 void
 RegionSelection::remove_it (RegionView *rv)
 {
        remove (rv);
 }
 
-/**
- *  Remove a region from the selection.
+/** Remove a region from the selection.
  *  @param rv Region to remove.
  *  @return true if the region was in the selection, false if not.
  */
-
 bool
 RegionSelection::remove (RegionView* rv)
 {
@@ -213,11 +200,9 @@ RegionSelection::remove (RegionView* rv)
        return false;
 }
 
-/**
- *  Add a region to the list sorted by layer.
+/** Add a region to the list sorted by layer.
  *  @param rv Region to add.
  */
-
 void
 RegionSelection::add_to_layer (RegionView * rv)
 {
@@ -248,7 +233,6 @@ struct RegionSortByTime {
  *  @param foo List which will be filled with the selection's regions
  *  sorted by position.
  */
-
 void
 RegionSelection::by_position (list<RegionView*>& foo) const
 {
@@ -281,7 +265,6 @@ struct RegionSortByTrack {
  *  @param List which will be filled with the selection's regions
  *  sorted by track and position.
  */
-
 void
 RegionSelection::by_track (list<RegionView*>& foo) const
 {
@@ -299,7 +282,6 @@ RegionSelection::by_track (list<RegionView*>& foo) const
 /**
  *  @param Sort the selection by position and track.
  */
-
 void
 RegionSelection::sort_by_position_and_track ()
 {
@@ -311,7 +293,6 @@ RegionSelection::sort_by_position_and_track ()
  *  @param tv Track.
  *  @return true if any of the selection's regions are on tv.
  */
-
 bool
 RegionSelection::involves (const TimeAxisView& tv) const
 {
@@ -322,4 +303,4 @@ RegionSelection::involves (const TimeAxisView& tv) const
        }
        return false;
 }
-       
+
index d307eeaa950f1aa17754fa3b40660058074723af..7efde0ddf2c0c2a11b6fba329d6a95118200e89a 100644 (file)
@@ -82,7 +82,8 @@ RegionView::RegionView (ArdourCanvas::Group*              parent,
 }
 
 RegionView::RegionView (const RegionView& other)
-       : TimeAxisViewItem (other)
+       : sigc::trackable(other)
+       , TimeAxisViewItem (other)
        , _time_converter(other._time_converter)
 {
        /* derived concrete type will call init () */
@@ -95,7 +96,8 @@ RegionView::RegionView (const RegionView& other)
 }
 
 RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other_region)
-       : TimeAxisViewItem (other)
+       : sigc::trackable(other)
+       , TimeAxisViewItem (other)
        , _time_converter(other._time_converter)
 {
        /* this is a pseudo-copy constructor used when dragging regions 
index f3f27d5183f945af3283dd6a5a96a3f69474d02f..b5b8a25d1f3018aed0ad97df1758123959964527 100644 (file)
@@ -1435,7 +1435,7 @@ RouteTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size
        boost::shared_ptr<Playlist> playlist = get_diskstream()->playlist();
        PlaylistSelection::iterator p;
        
-       for (p = selection.playlists.begin(); p != selection.playlists.end() && nth; ++p, --nth);
+       for (p = selection.playlists.begin(); p != selection.playlists.end() && nth; ++p, --nth) {}
 
        if (p == selection.playlists.end()) {
                return false;
index 98c8b7cce99c414fd9a2de1d0b7c74a672a69d6e..c2078f403deb4db9f5391802e02e9b94bfaad842 100644 (file)
@@ -105,7 +105,8 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group&
 }
 
 TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
-       : trackview (other.trackview)
+       : sigc::trackable(other)
+       , trackview (other.trackview)
 {
 
        Gdk::Color c;
index ecf22443ad5c70224693ddf27b78657830cb3848..0039a1f8ca51fdb06c5c482861f2db9cb60800ed 100644 (file)
@@ -21,7 +21,6 @@
 #define __ardour_plugin_h__
 
 #include <boost/shared_ptr.hpp>
-#include <boost/utility.hpp>
 #include <sigc++/signal.h>
 #include <glibmm/ustring.h>
 
@@ -88,7 +87,7 @@ class PluginInfo {
 typedef boost::shared_ptr<PluginInfo> PluginInfoPtr;
 typedef std::list<PluginInfoPtr> PluginInfoList;
 
-class Plugin : public PBD::StatefulDestructible, public Latent, public boost::noncopyable
+class Plugin : public PBD::StatefulDestructible, public Latent
 {
   public:
        Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&);
@@ -194,14 +193,16 @@ class Plugin : public PBD::StatefulDestructible, public Latent, public boost::no
   protected:
        friend class PluginInsert;
        friend struct PluginInsert::PluginControl;
+       
        virtual void set_parameter (uint32_t which, float val) = 0;
+       
+       bool save_preset (string uri, string domain /* vst, ladspa etc. */);
 
-       ARDOUR::AudioEngine& _engine;
-       ARDOUR::Session& _session;
-       PluginInfoPtr _info;
-       uint32_t _cycles;
-       map<string,PresetRecord> presets;
-       bool save_preset(string uri, string domain /* vst, ladspa etc. */);
+       ARDOUR::AudioEngine&     _engine;
+       ARDOUR::Session&         _session;
+       PluginInfoPtr            _info;
+       uint32_t                 _cycles;
+       map<string,PresetRecord>  presets;
 };
 
 PluginPtr find_plugin(ARDOUR::Session&, string unique_id, ARDOUR::PluginType);
index 6a42762fa00d6e0368b68be698c63e1243bf44c5..e82639ef517f405efa0463f53acbd0521063eab1 100644 (file)
@@ -90,7 +90,7 @@ class MetricSection {
        virtual ~MetricSection() {}
 
        const BBT_Time& start() const { return _start; }
-       const nframes_t frame() const { return _frame; }
+       nframes_t       frame() const { return _frame; }
 
        void set_movable (bool yn) { _movable = yn; }
        bool movable() const { return _movable; }
index c0325509b1f640778c1fda12ed72bf0a7669fe60..ab05aa4a649e21fdf4353394107dd1365286bcce 100644 (file)
@@ -160,24 +160,24 @@ ExportFormatSpecification::Time::set_state (const XMLNode & node)
        return 0;
 }
 
-ExportFormatSpecification::ExportFormatSpecification (Session & s) :
-  session (s),
-
-   has_sample_format (false),
-   supports_tagging (false),
-  _has_broadcast_info (false),
-  _channel_limit (0),
-  _dither_type (D_None),
-  _src_quality (SRC_SincBest),
-  _tag (true),
-
-  _trim_beginning (false),
-  _silence_beginning (s),
-  _trim_end (false),
-  _silence_end (s),
-
-  _normalize (false),
-  _normalize_target (1.0)
+ExportFormatSpecification::ExportFormatSpecification (Session & s)
+       : session (s)
+       
+       , has_sample_format (false)
+       , supports_tagging (false)
+       , _has_broadcast_info (false)
+       , _channel_limit (0)
+       , _dither_type (D_None)
+       , _src_quality (SRC_SincBest)
+       , _tag (true)
+       
+       , _trim_beginning (false)
+       , _silence_beginning (s)
+       , _trim_end (false)
+       , _silence_end (s)
+       
+       , _normalize (false)
+       , _normalize_target (1.0)
 {
        format_ids.insert (F_None);
        endiannesses.insert (E_FileDefault);
@@ -186,10 +186,10 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s) :
        qualities.insert (Q_None);
 }
 
-ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const & state) :
-   session (s),
-  _silence_beginning (s),
-  _silence_end (s)
+ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const & state)
+       : session (s)
+       , _silence_beginning (s)
+       , _silence_end (s)
 {
        _silence_beginning.type = Time::SMPTE;
        _silence_end.type = Time::SMPTE;
@@ -197,10 +197,11 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const
        set_state (state);
 }
 
-ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification const & other) :
-   session (other.session),
-  _silence_beginning (other.session),
-  _silence_end (other.session)
+ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification const & other)
+       : ExportFormatBase(other)
+       , session (other.session)
+       , _silence_beginning (other.session)
+       , _silence_end (other.session)
 {
        set_name (other.name() + " (copy)");
 
index 79934f19e72c88b46ffcf9af652ff4a16d0ad601..dcc43c8a7fdbb8ccbbc9ed72d2cef84e30b3cb88 100644 (file)
@@ -182,11 +182,7 @@ SampleRateConverter::process (float * data, nframes_t frames)
                
                
                nframes_t frames_written = piped_to->write (data_out, frames_out);
-               if (frames_written < 0) {
-                       return frames_written;
-               } else {
-                       frames_out_total += frames_written;
-               }
+               frames_out_total += frames_written;
 
        } while (leftover_frames > frames_in);
 
index 8f7aac90293e64a677a1de649df037c2aa9e2176..80d5f8c9168956c5d9997ebcd425ddcf3e36efba 100644 (file)
@@ -1633,7 +1633,7 @@ IO::find_possible_bundle (const string &desired_name, const string &default_name
 
                // find highest set bit
                mask = 1;
-               while ((mask <= bundle_number) && (mask <<= 1));
+               while ((mask <= bundle_number) && (mask <<= 1)) {}
                
                // "wrap" bundle number into largest possible power of 2 
                // that works...
index 77f9a6cb439cf884c1e33cdbc30f6b32e03cacee..cf77146699c5692e827ec36c117f79468343e02a 100644 (file)
@@ -131,8 +131,7 @@ MidiPort::flush_buffers (nframes_t nframes, nframes_t offset)
 
                for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) {
                        const Evoral::Event<nframes_t>& ev = *i;
-                       // event times should be frames, relative to cycle start
-                       assert(ev.time() >= 0);
+                       // event times are in frames, relative to cycle start
                        assert(ev.time() < (nframes+offset));
                        if (ev.time() >= offset) {
                                jack_midi_event_write (jack_buffer, (jack_nframes_t) ev.time(), ev.buffer(), ev.size());
index b9c5004d85851a451079ec9b5c11bce77022585a..2492d157bcea854c8abe001f82c6a8270cda2160 100644 (file)
@@ -897,7 +897,7 @@ void
 Panner::remove (uint32_t which)
 {
        vector<StreamPanner*>::iterator i;
-       for (i = _streampanners.begin(); i != _streampanners.end() && which; ++i, --which);
+       for (i = _streampanners.begin(); i != _streampanners.end() && which; ++i, --which) {}
 
        if (i != _streampanners.end()) {
                delete *i;
index f69de57b9972cf8aeab6b036f3fd05c86b1541a7..b9db471cede5e454a73b33c4d6014370c78ff02b 100644 (file)
@@ -58,12 +58,18 @@ using namespace ARDOUR;
 using namespace PBD;
 
 Plugin::Plugin (AudioEngine& e, Session& s)
-       : _engine (e), _session (s)
+       : _engine (e)
+       , _session (s)
+       , _cycles (0)
 {
 }
 
 Plugin::Plugin (const Plugin& other)
-       : _engine (other._engine), _session (other._session), _info (other._info)
+       : _engine (other._engine)
+       , _session (other._session)
+       , _info (other._info)
+       , _cycles (0)
+       , presets (other.presets)
 {
 }
 
index 34947f419aaf5da22cf63df2aa66970b4e5cba75..9833824697f8c43b5116f8bbd5b7e2256cbeef2c 100644 (file)
@@ -279,7 +279,6 @@ SMFSource::append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sfr
                        name().c_str(), ev.time(), ev.size()); 
        for (size_t i=0; i < ev.size(); ++i) printf("%X ", ev.buffer()[i]); printf("\n");*/
        
-       assert(ev.time() >= 0);
        if (ev.time() < _last_ev_time_frames) {
                cerr << "SMFSource: Warning: Skipping event with non-monotonic time" << endl;
                return;
index e15a3524db726174f5872350defc0ada12d54449..7b60d6ba52b33d5e111d315514609478d3c157dd 100644 (file)
@@ -341,7 +341,7 @@ UI::signal_pipe_callback (void *arg, int fd, GdkInputCondition cond)
        
        /* flush (nonblocking) pipe */
        
-       while (read (fd, buf, 256) > 0);
+       while (read (fd, buf, 256) > 0) {}
        
        ((UI *) arg)->handle_ui_requests ();
 }