summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-26 00:58:35 +0000
committerDavid Robillard <d@drobilla.net>2009-02-26 00:58:35 +0000
commit03536cd399131e3fec54c95ae5ac6f11dca05aef (patch)
treece73dfb9f1258c79f0e985840a12842154683479
parent3bc71af0ca89354670243e600c70374bfb224c6d (diff)
Fix a bunch of warnings.
Clean up. git-svn-id: svn://localhost/ardour2/branches/3.0@4668 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/analysis_window.h131
-rw-r--r--gtk2_ardour/audio_region_view.cc3
-rw-r--r--gtk2_ardour/automation_time_axis.cc2
-rw-r--r--gtk2_ardour/canvas-note-event.h2
-rw-r--r--gtk2_ardour/canvas-waveview.c33
-rw-r--r--gtk2_ardour/fft_graph.h4
-rw-r--r--gtk2_ardour/fft_result.h8
-rw-r--r--gtk2_ardour/gtk-custom-hruler.c4
-rw-r--r--gtk2_ardour/gtk-custom-ruler.c1
-rw-r--r--gtk2_ardour/midi_channel_selector.cc2
-rw-r--r--gtk2_ardour/midi_channel_selector.h6
-rw-r--r--gtk2_ardour/midi_region_view.cc3
-rw-r--r--gtk2_ardour/panner2d.cc2
-rw-r--r--gtk2_ardour/plugin_selector.cc5
-rw-r--r--gtk2_ardour/region_selection.cc41
-rw-r--r--gtk2_ardour/region_view.cc6
-rw-r--r--gtk2_ardour/route_time_axis.cc2
-rw-r--r--gtk2_ardour/time_axis_view_item.cc3
-rw-r--r--libs/ardour/ardour/plugin.h17
-rw-r--r--libs/ardour/ardour/tempo.h2
-rw-r--r--libs/ardour/export_format_specification.cc53
-rw-r--r--libs/ardour/export_utilities.cc6
-rw-r--r--libs/ardour/io.cc2
-rw-r--r--libs/ardour/midi_port.cc3
-rw-r--r--libs/ardour/panner.cc2
-rw-r--r--libs/ardour/plugin.cc10
-rw-r--r--libs/ardour/smf_source.cc1
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc2
28 files changed, 174 insertions, 182 deletions
diff --git a/gtk2_ardour/analysis_window.h b/gtk2_ardour/analysis_window.h
index 45752c4a34..185774225b 100644
--- a/gtk2_ardour/analysis_window.h
+++ b/gtk2_ardour/analysis_window.h
@@ -45,82 +45,81 @@
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
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 17de6517ac..df44b3a4aa 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -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)
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 5d6b48850e..bd0da7caf8 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -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;
diff --git a/gtk2_ardour/canvas-note-event.h b/gtk2_ardour/canvas-note-event.h
index 75747bc288..86f7312d17 100644
--- a/gtk2_ardour/canvas-note-event.h
+++ b/gtk2_ardour/canvas-note-event.h
@@ -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(
diff --git a/gtk2_ardour/canvas-waveview.c b/gtk2_ardour/canvas-waveview.c
index f929b31197..5c67044084 100644
--- a/gtk2_ardour/canvas-waveview.c
+++ b/gtk2_ardour/canvas-waveview.c
@@ -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:
diff --git a/gtk2_ardour/fft_graph.h b/gtk2_ardour/fft_graph.h
index ea91a08ea9..50a2df1fda 100644
--- a/gtk2_ardour/fft_graph.h
+++ b/gtk2_ardour/fft_graph.h
@@ -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:
diff --git a/gtk2_ardour/fft_result.h b/gtk2_ardour/fft_result.h
index fa2a569108..2042b2d042 100644
--- a/gtk2_ardour/fft_result.h
+++ b/gtk2_ardour/fft_result.h
@@ -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);
diff --git a/gtk2_ardour/gtk-custom-hruler.c b/gtk2_ardour/gtk-custom-hruler.c
index f0bbb9152e..1446fb487f 100644
--- a/gtk2_ardour/gtk-custom-hruler.c
+++ b/gtk2_ardour/gtk-custom-hruler.c
@@ -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",
diff --git a/gtk2_ardour/gtk-custom-ruler.c b/gtk2_ardour/gtk-custom-ruler.c
index 0e7ceb5875..c795e46201 100644
--- a/gtk2_ardour/gtk-custom-ruler.c
+++ b/gtk2_ardour/gtk-custom-ruler.c
@@ -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",
diff --git a/gtk2_ardour/midi_channel_selector.cc b/gtk2_ardour/midi_channel_selector.cc
index 12eea5bb12..030a0608ef 100644
--- a/gtk2_ardour/midi_channel_selector.cc
+++ b/gtk2_ardour/midi_channel_selector.cc
@@ -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;
diff --git a/gtk2_ardour/midi_channel_selector.h b/gtk2_ardour/midi_channel_selector.h
index a2b6247c75..f604d0ccd3 100644
--- a/gtk2_ardour/midi_channel_selector.h
+++ b/gtk2_ardour/midi_channel_selector.h
@@ -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;
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc
index 2ea8316b37..4a5c209101 100644
--- a/gtk2_ardour/midi_region_view.cc
+++ b/gtk2_ardour/midi_region_view.cc
@@ -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)
diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc
index 7a081101f6..0f4655221e 100644
--- a/gtk2_ardour/panner2d.cc
+++ b/gtk2_ardour/panner2d.cc
@@ -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);
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc
index ac9e785522..9398661d70 100644
--- a/gtk2_ardour/plugin_selector.cc
+++ b/gtk2_ardour/plugin_selector.cc
@@ -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 {
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc
index 76dfe33107..ac8a783a41 100644
--- a/gtk2_ardour/region_selection.cc
+++ b/gtk2_ardour/region_selection.cc
@@ -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;
}
-
+
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index d307eeaa95..7efde0ddf2 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -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
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index f3f27d5183..b5b8a25d1f 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -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;
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 98c8b7cce9..c2078f403d 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -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;
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index ecf22443ad..0039a1f8ca 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -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);
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index 6a42762fa0..e82639ef51 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -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; }
diff --git a/libs/ardour/export_format_specification.cc b/libs/ardour/export_format_specification.cc
index c0325509b1..ab05aa4a64 100644
--- a/libs/ardour/export_format_specification.cc
+++ b/libs/ardour/export_format_specification.cc
@@ -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)");
diff --git a/libs/ardour/export_utilities.cc b/libs/ardour/export_utilities.cc
index 79934f19e7..dcc43c8a7f 100644
--- a/libs/ardour/export_utilities.cc
+++ b/libs/ardour/export_utilities.cc
@@ -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);
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index 8f7aac9029..80d5f8c916 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -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...
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index 77f9a6cb43..cf77146699 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -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());
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc
index b9c5004d85..2492d157bc 100644
--- a/libs/ardour/panner.cc
+++ b/libs/ardour/panner.cc
@@ -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;
diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc
index f69de57b99..b9db471ced 100644
--- a/libs/ardour/plugin.cc
+++ b/libs/ardour/plugin.cc
@@ -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)
{
}
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc
index 34947f419a..9833824697 100644
--- a/libs/ardour/smf_source.cc
+++ b/libs/ardour/smf_source.cc
@@ -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;
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index e15a3524db..7b60d6ba52 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -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 ();
}