summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/audio_region_view.h2
-rw-r--r--gtk2_ardour/audio_streamview.h4
-rw-r--r--gtk2_ardour/automation_selection.h2
-rw-r--r--gtk2_ardour/axis_view.h2
-rw-r--r--gtk2_ardour/editor_cursors.h13
-rw-r--r--gtk2_ardour/editor_drag.h3
-rw-r--r--gtk2_ardour/editor_regions.cc3
-rw-r--r--gtk2_ardour/export_format_dialog.cc10
-rw-r--r--gtk2_ardour/group_tabs.cc2
-rw-r--r--gtk2_ardour/gui_object.h2
-rw-r--r--gtk2_ardour/midi_list_editor.cc7
-rw-r--r--gtk2_ardour/midi_streamview.h6
-rw-r--r--gtk2_ardour/mixer_strip.cc2
-rw-r--r--gtk2_ardour/point_selection.h2
-rw-r--r--gtk2_ardour/port_matrix_types.h3
-rw-r--r--gtk2_ardour/public_editor.h36
-rw-r--r--gtk2_ardour/route_ui.cc2
-rw-r--r--gtk2_ardour/streamview.h4
-rw-r--r--gtk2_ardour/volume_controller.cc2
-rw-r--r--libs/ardour/ardour/bundle.h3
-rw-r--r--libs/ardour/ardour/control_protocol_manager.h3
-rw-r--r--libs/ardour/ardour/export_status.h4
-rw-r--r--libs/ardour/ardour/import_status.h3
-rw-r--r--libs/ardour/ardour/interthread_info.h5
-rw-r--r--libs/ardour/ardour/midi_buffer.h3
-rw-r--r--libs/ardour/ardour/named_selection.h3
-rw-r--r--libs/ardour/ardour/playlist.h6
-rw-r--r--libs/ardour/ardour/session_event.h3
-rw-r--r--libs/ardour/ardour/types.h3
-rw-r--r--libs/ardour/export_format_manager.cc6
-rw-r--r--libs/ardour/globals.cc6
-rw-r--r--libs/ardour/midi_playlist.cc6
-rw-r--r--libs/ardour/midi_ring_buffer.cc4
-rw-r--r--libs/audiographer/audiographer/process_context.h3
-rw-r--r--libs/evoral/evoral/ControlList.hpp3
-rw-r--r--libs/evoral/evoral/Event.hpp3
-rw-r--r--libs/evoral/evoral/EventRingBuffer.hpp8
-rw-r--r--libs/evoral/evoral/MIDIEvent.hpp3
-rw-r--r--libs/evoral/src/libsmf/smf_save.c1
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/gui_thread.h2
-rw-r--r--libs/midi++2/jack_midi_port.cc4
-rw-r--r--libs/midi++2/midi++/ipmidi_port.h3
-rw-r--r--libs/midi++2/midi++/port.h3
-rw-r--r--libs/midi++2/mtc.cc2
-rw-r--r--libs/surfaces/control_protocol/control_protocol/control_protocol.h3
-rw-r--r--wscript5
46 files changed, 112 insertions, 96 deletions
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index 233b53475b..5e41c382bb 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -35,7 +35,7 @@
namespace ARDOUR {
class AudioRegion;
- class PeakData;
+ struct PeakData;
};
class AudioTimeAxisView;
diff --git a/gtk2_ardour/audio_streamview.h b/gtk2_ardour/audio_streamview.h
index cb3175798e..5ef83b7adc 100644
--- a/gtk2_ardour/audio_streamview.h
+++ b/gtk2_ardour/audio_streamview.h
@@ -35,10 +35,10 @@ namespace Gdk {
}
namespace ARDOUR {
- class Route;
- class PeakData;
class AudioRegion;
+ class Route;
class Source;
+ struct PeakData;
}
class PublicEditor;
diff --git a/gtk2_ardour/automation_selection.h b/gtk2_ardour/automation_selection.h
index f22d4831e2..6f30c588e2 100644
--- a/gtk2_ardour/automation_selection.h
+++ b/gtk2_ardour/automation_selection.h
@@ -26,6 +26,6 @@ namespace ARDOUR {
class AutomationList;
}
-struct AutomationSelection : std::list<boost::shared_ptr<ARDOUR::AutomationList> > {};
+class AutomationSelection : public std::list<boost::shared_ptr<ARDOUR::AutomationList> > {};
#endif /* __ardour_gtk_automation_selection_h__ */
diff --git a/gtk2_ardour/axis_view.h b/gtk2_ardour/axis_view.h
index 2c891524b8..17f8c09a7b 100644
--- a/gtk2_ardour/axis_view.h
+++ b/gtk2_ardour/axis_view.h
@@ -63,7 +63,7 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
std::string gui_property (const std::string& property_name) const;
template<typename T> void set_gui_property (const std::string& property_name, const T& value) {
- gui_object_state().set<T> (state_id(), property_name, value);
+ gui_object_state().set_property<T> (state_id(), property_name, value);
}
bool marked_for_display () const;
diff --git a/gtk2_ardour/editor_cursors.h b/gtk2_ardour/editor_cursors.h
index b5c228a54a..2e2c654bd1 100644
--- a/gtk2_ardour/editor_cursors.h
+++ b/gtk2_ardour/editor_cursors.h
@@ -21,12 +21,13 @@
class Editor;
-struct EditorCursor {
- Editor& editor;
- ArdourCanvas::Points points;
- ArdourCanvas::Line canvas_item;
+class EditorCursor {
+public:
+ Editor& editor;
+ ArdourCanvas::Points points;
+ ArdourCanvas::Line canvas_item;
framepos_t current_frame;
- double length;
+ double length;
EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
~EditorCursor ();
@@ -35,5 +36,5 @@ struct EditorCursor {
void set_length (double units);
void set_y_axis (double position);
- PBD::Signal1<void, framepos_t> PositionChanged;
+ PBD::Signal1<void, framepos_t> PositionChanged;
};
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index 2f81e06efc..1579a178a8 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -242,8 +242,9 @@ private:
class RegionDrag;
/** Container for details about a region being dragged */
-struct DraggingView
+class DraggingView
{
+public:
DraggingView (RegionView *, RegionDrag *);
RegionView* view; ///< the view
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 5a06c69648..ab4f7afe3c 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -303,7 +303,6 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
TreeModel::iterator iter = _model->get_iter ("0");
TreeModel::Row parent;
- TreeModel::Row child;
if (!iter) {
parent = *(_model->append());
@@ -550,7 +549,7 @@ EditorRegions::selection_changed ()
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
- if (iter = _model->get_iter (*i)) {
+ if ((iter = _model->get_iter (*i))) {
boost::shared_ptr<Region> region = (*iter)[_columns.region];
// they could have clicked on a row that is just a placeholder, like "Hidden"
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc
index 814e0388be..e0f6d51216 100644
--- a/gtk2_ardour/export_format_dialog.cc
+++ b/gtk2_ardour/export_format_dialog.cc
@@ -393,7 +393,7 @@ ExportFormatDialog::init_format_table ()
boost::shared_ptr<HasSampleFormat> hsf;
- if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (*it)) {
+ if ((hsf = boost::dynamic_pointer_cast<HasSampleFormat> (*it))) {
hsf->SampleFormatSelectChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_format_selection, this, _1, _2), gui_context());
hsf->SampleFormatCompatibleChanged.connect (*this, invalidator (*this), boost::bind (&ExportFormatDialog::change_sample_format_compatibility, this, _1, _2), gui_context());
@@ -832,13 +832,13 @@ ExportFormatDialog::change_encoding_options (ExportFormatPtr ptr)
boost::shared_ptr<ARDOUR::ExportFormatFLAC> flac_ptr;
boost::shared_ptr<ARDOUR::ExportFormatBWF> bwf_ptr;
- if (linear_ptr = boost::dynamic_pointer_cast<ExportFormatLinear> (ptr)) {
+ if ((linear_ptr = boost::dynamic_pointer_cast<ExportFormatLinear> (ptr))) {
show_linear_enconding_options (linear_ptr);
- } else if (ogg_ptr = boost::dynamic_pointer_cast<ExportFormatOggVorbis> (ptr)) {
+ } else if ((ogg_ptr = boost::dynamic_pointer_cast<ExportFormatOggVorbis> (ptr))) {
show_ogg_enconding_options (ogg_ptr);
- } else if (flac_ptr = boost::dynamic_pointer_cast<ExportFormatFLAC> (ptr)) {
+ } else if ((flac_ptr = boost::dynamic_pointer_cast<ExportFormatFLAC> (ptr))) {
show_flac_enconding_options (flac_ptr);
- } else if (bwf_ptr = boost::dynamic_pointer_cast<ExportFormatBWF> (ptr)) {
+ } else if ((bwf_ptr = boost::dynamic_pointer_cast<ExportFormatBWF> (ptr))) {
show_bwf_enconding_options (bwf_ptr);
} else {
std::cout << "Unrecognized format!" << std::endl;
diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc
index 5dbeeffd09..9ce3b15046 100644
--- a/gtk2_ardour/group_tabs.cc
+++ b/gtk2_ardour/group_tabs.cc
@@ -545,7 +545,7 @@ GroupTabs::set_group_color (RouteGroup* group, Gdk::Color color)
char buf[64];
snprintf (buf, sizeof (buf), "%d:%d:%d", color.get_red(), color.get_green(), color.get_blue());
- gui_state.set (group_gui_id (group), "color", buf);
+ gui_state.set_property (group_gui_id (group), "color", buf);
/* the group color change notification */
diff --git a/gtk2_ardour/gui_object.h b/gtk2_ardour/gui_object.h
index dd56f4b34c..469d311485 100644
--- a/gtk2_ardour/gui_object.h
+++ b/gtk2_ardour/gui_object.h
@@ -43,7 +43,7 @@ public:
std::string get_string (const std::string& id, const std::string& prop_name, bool* empty = 0);
- template<typename T> void set (const std::string& id, const std::string& prop_name, const T& val) {
+ template<typename T> void set_property (const std::string& id, const std::string& prop_name, const T& val) {
XMLNode* child = get_or_add_node (id);
std::stringstream s;
s << val;
diff --git a/gtk2_ardour/midi_list_editor.cc b/gtk2_ardour/midi_list_editor.cc
index 66a8e8b6df..20fc0ed433 100644
--- a/gtk2_ardour/midi_list_editor.cc
+++ b/gtk2_ardour/midi_list_editor.cc
@@ -282,7 +282,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
previous_selection.push_back (*i);
- if (iter = model->get_iter (*i)) {
+ if ((iter = model->get_iter (*i))) {
note = (*iter)[columns._note];
@@ -445,7 +445,6 @@ MidiListEditor::key_release (GdkEventKey* ev)
TreeModel::Path path;
TreeViewColumn* col;
TreeModel::iterator iter;
- TreeModel::Row row;
MidiModel::NoteDiffCommand* cmd;
boost::shared_ptr<MidiModel> m (region->midi_source(0)->model());
boost::shared_ptr<NoteType> note;
@@ -702,7 +701,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
TreeView::Selection::ListHandle_Path rows = view.get_selection()->get_selected_rows ();
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
- if (iter = model->get_iter (*i)) {
+ if ((iter = model->get_iter (*i))) {
note = (*iter)[columns._note];
@@ -809,7 +808,7 @@ MidiListEditor::selection_changed ()
NotePlayer* player = new NotePlayer (track);
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
- if (iter = model->get_iter (*i)) {
+ if ((iter = model->get_iter (*i))) {
note = (*iter)[columns._note];
player->add (note);
}
diff --git a/gtk2_ardour/midi_streamview.h b/gtk2_ardour/midi_streamview.h
index aceb59e69f..d216752eda 100644
--- a/gtk2_ardour/midi_streamview.h
+++ b/gtk2_ardour/midi_streamview.h
@@ -34,12 +34,12 @@ namespace Gdk {
}
namespace ARDOUR {
- class Route;
class Crossfade;
- class PeakData;
+ class MidiModel;
class MidiRegion;
+ class Route;
class Source;
- class MidiModel;
+ struct PeakData;
}
class PublicEditor;
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 16ac8780b8..542ab7b21f 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -1171,7 +1171,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
}
if (each_io_has_one_connection) {
- if ((total_connection_count == ardour_connection_count)) {
+ if (total_connection_count == ardour_connection_count) {
// all connections are to the same track in ardour
// "ardour:Master/" -> "Master"
string::size_type slash = ardour_track_name.find("/");
diff --git a/gtk2_ardour/point_selection.h b/gtk2_ardour/point_selection.h
index 5ed5ae1573..608a499229 100644
--- a/gtk2_ardour/point_selection.h
+++ b/gtk2_ardour/point_selection.h
@@ -24,7 +24,7 @@
class ControlPoint;
-struct PointSelection : public std::list<ControlPoint *>
+class PointSelection : public std::list<ControlPoint *>
{
};
diff --git a/gtk2_ardour/port_matrix_types.h b/gtk2_ardour/port_matrix_types.h
index 15c40713b0..dafbc858b6 100644
--- a/gtk2_ardour/port_matrix_types.h
+++ b/gtk2_ardour/port_matrix_types.h
@@ -22,8 +22,9 @@
#include "ardour/bundle.h"
-struct PortMatrixNode
+class PortMatrixNode
{
+public:
PortMatrixNode () {}
PortMatrixNode (ARDOUR::BundleChannel r, ARDOUR::BundleChannel c) : row (r), column (c) {}
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index ce625e1889..57e3c8dede 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -62,31 +62,31 @@ namespace Gtkmm2ext {
class TearOff;
}
-class Editor;
-class TimeAxisViewItem;
-class TimeAxisView;
-class PluginUIWindow;
-class PluginSelector;
-class PlaylistSelector;
-class XMLNode;
-class Selection;
+class AudioRegionView;
class AutomationLine;
+class AutomationTimeAxisView;
class ControlPoint;
-class SelectionRect;
-class RouteTimeAxisView;
-class RegionView;
-class AudioRegionView;
-class TempoMarker;
-class MeterMarker;
+class DragManager;
+class Editor;
+class ImageFrameTimeAxis;
+class ImageFrameView;
class Marker;
-class AutomationTimeAxisView;
class MarkerTimeAxis;
-class ImageFrameView;
-class ImageFrameTimeAxis;
class MarkerView;
-class DragManager;
+class MeterMarker;
class MouseCursors;
+class PlaylistSelector;
+class PluginSelector;
+class PluginUIWindow;
+class RegionView;
+class RouteTimeAxisView;
+class Selection;
+class TempoMarker;
+class TimeAxisView;
+class TimeAxisViewItem;
class VerboseCursor;
+class XMLNode;
+struct SelectionRect;
using ARDOUR::framepos_t;
using ARDOUR::framecnt_t;
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index bd8d390962..6fdd10d9cc 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -1347,7 +1347,7 @@ RouteUI::set_color (const Gdk::Color & c)
the time axis view and the mixer strip
*/
- gui_object_state().set<string> (route_state_id(), X_("color"), buf);
+ gui_object_state().set_property<string> (route_state_id(), X_("color"), buf);
_route->gui_changed ("color", (void *) 0); /* EMIT_SIGNAL */
}
diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h
index f49bc87259..0d15a5d7d7 100644
--- a/gtk2_ardour/streamview.h
+++ b/gtk2_ardour/streamview.h
@@ -34,12 +34,12 @@ namespace Gdk {
}
namespace ARDOUR {
- class Route;
class Crossfade;
- class PeakData;
class Region;
+ class Route;
class Source;
class Track;
+ struct PeakData;
}
struct RecBoxInfo {
diff --git a/gtk2_ardour/volume_controller.cc b/gtk2_ardour/volume_controller.cc
index c72a31036a..27fd705978 100644
--- a/gtk2_ardour/volume_controller.cc
+++ b/gtk2_ardour/volume_controller.cc
@@ -101,7 +101,7 @@ VolumeController::dB_printer (char buf[32], const boost::shared_ptr<PBD::Control
}
}
} else {
- snprintf (buf, sizeof (buf), "--");
+ snprintf (buf, 32, "--");
}
}
diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h
index 2bf614e75f..e84349c647 100644
--- a/libs/ardour/ardour/bundle.h
+++ b/libs/ardour/ardour/bundle.h
@@ -149,8 +149,9 @@ class Bundle : public PBD::ScopedConnectionList
Change _pending_change;
};
-struct BundleChannel
+class BundleChannel
{
+public:
BundleChannel () : channel (-1) {}
BundleChannel (boost::shared_ptr<Bundle> b, int c)
diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h
index 19abbaf6be..20358025f1 100644
--- a/libs/ardour/ardour/control_protocol_manager.h
+++ b/libs/ardour/ardour/control_protocol_manager.h
@@ -35,7 +35,8 @@ class ControlProtocol;
class ControlProtocolDescriptor;
class Session;
-struct ControlProtocolInfo {
+class ControlProtocolInfo {
+public:
ControlProtocolDescriptor* descriptor;
ControlProtocol* protocol;
std::string name;
diff --git a/libs/ardour/ardour/export_status.h b/libs/ardour/ardour/export_status.h
index 56b15eada1..164b348c37 100644
--- a/libs/ardour/ardour/export_status.h
+++ b/libs/ardour/ardour/export_status.h
@@ -31,8 +31,8 @@
namespace ARDOUR
{
-struct ExportStatus {
-
+class ExportStatus {
+ public:
ExportStatus ();
void init ();
diff --git a/libs/ardour/ardour/import_status.h b/libs/ardour/ardour/import_status.h
index 1753abe655..c261b7a960 100644
--- a/libs/ardour/ardour/import_status.h
+++ b/libs/ardour/ardour/import_status.h
@@ -30,7 +30,8 @@
namespace ARDOUR {
-struct ImportStatus : public InterThreadInfo {
+class ImportStatus : public InterThreadInfo {
+public:
std::string doing_what;
/* control info */
diff --git a/libs/ardour/ardour/interthread_info.h b/libs/ardour/ardour/interthread_info.h
index 908276067a..01cacf437c 100644
--- a/libs/ardour/ardour/interthread_info.h
+++ b/libs/ardour/ardour/interthread_info.h
@@ -27,14 +27,15 @@
namespace ARDOUR {
- struct InterThreadInfo {
+ class InterThreadInfo {
+ public:
InterThreadInfo () : done (false), cancel (false), progress (0), thread (0) {}
volatile bool done;
volatile bool cancel;
volatile float progress;
pthread_t thread;
- ProcessThread process_thread;
+ ProcessThread process_thread;
};
} // namespace
diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h
index db02344249..183ca7eea9 100644
--- a/libs/ardour/ardour/midi_buffer.h
+++ b/libs/ardour/ardour/midi_buffer.h
@@ -53,7 +53,8 @@ public:
bool merge_in_place(const MidiBuffer &other);
template<typename BufferType, typename EventType>
- struct iterator_base {
+ class iterator_base {
+ public:
iterator_base<BufferType, EventType>(BufferType& b, framecnt_t o) : buffer(b), offset(o) {}
inline EventType operator*() const {
uint8_t* ev_start = buffer._data + offset + sizeof(TimeType);
diff --git a/libs/ardour/ardour/named_selection.h b/libs/ardour/ardour/named_selection.h
index f03db20574..c120848328 100644
--- a/libs/ardour/ardour/named_selection.h
+++ b/libs/ardour/ardour/named_selection.h
@@ -34,8 +34,9 @@ namespace ARDOUR
class Session;
class Playlist;
-struct NamedSelection : public PBD::Stateful
+class NamedSelection : public PBD::Stateful
{
+public:
NamedSelection (std::string, std::list<boost::shared_ptr<Playlist> >&);
NamedSelection (Session&, const XMLNode&);
virtual ~NamedSelection ();
diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h
index ff2ac35954..59b7ae406c 100644
--- a/libs/ardour/ardour/playlist.h
+++ b/libs/ardour/ardour/playlist.h
@@ -230,12 +230,14 @@ public:
friend class Session;
protected:
- struct RegionReadLock : public Glib::RWLock::ReaderLock {
+ class RegionReadLock : public Glib::RWLock::ReaderLock {
+ public:
RegionReadLock (Playlist *pl) : Glib::RWLock::ReaderLock (pl->region_lock) {}
~RegionReadLock() {}
};
- struct RegionWriteLock : public Glib::RWLock::WriterLock {
+ class RegionWriteLock : public Glib::RWLock::WriterLock {
+ public:
RegionWriteLock (Playlist *pl, bool do_block_notify = true)
: Glib::RWLock::WriterLock (pl->region_lock)
, playlist (pl)
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h
index 27f778b8ac..932ddc9176 100644
--- a/libs/ardour/ardour/session_event.h
+++ b/libs/ardour/ardour/session_event.h
@@ -16,7 +16,8 @@ namespace ARDOUR {
class Slave;
class Region;
-struct SessionEvent {
+class SessionEvent {
+public:
enum Type {
SetTransportSpeed,
SetTrackSpeed,
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 6ac9ebfe70..6d05bdbbd8 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -213,7 +213,8 @@ namespace ARDOUR {
timecode_60
};
- struct AnyTime {
+ class AnyTime {
+ public:
enum Type {
Timecode,
BBT,
diff --git a/libs/ardour/export_format_manager.cc b/libs/ardour/export_format_manager.cc
index f995bc1b0e..23a77925fe 100644
--- a/libs/ardour/export_format_manager.cc
+++ b/libs/ardour/export_format_manager.cc
@@ -239,7 +239,7 @@ ExportFormatManager::add_format (ExportFormatPtr ptr)
boost::shared_ptr<HasSampleFormat> hsf;
- if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (ptr)) {
+ if ((hsf = boost::dynamic_pointer_cast<HasSampleFormat> (ptr))) {
hsf->SampleFormatSelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_sample_format_selection, this, _1, _2));
hsf->DitherTypeSelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_dither_type_selection, this, _1, _2));
}
@@ -682,7 +682,7 @@ ExportFormatManager::selection_changed ()
}
boost::shared_ptr<HasSampleFormat> hsf;
- if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (get_selected_format())) {
+ if ((hsf = boost::dynamic_pointer_cast<HasSampleFormat> (get_selected_format()))) {
SampleFormatList sf_list = hsf->get_sample_formats();
for (SampleFormatList::iterator it = sf_list.begin(); it != sf_list.end(); ++it) {
@@ -747,7 +747,7 @@ ExportFormatManager::get_selected_sample_format ()
{
boost::shared_ptr<HasSampleFormat> hsf;
- if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (get_selected_format())) {
+ if ((hsf = boost::dynamic_pointer_cast<HasSampleFormat> (get_selected_format()))) {
return hsf->get_selected_sample_format ();
} else {
return SampleFormatPtr ();
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 1560e96a97..0e0c508a58 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -112,7 +112,9 @@ mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0;
PBD::Signal1<void,std::string> ARDOUR::BootMessage;
-void ARDOUR::setup_enum_writer ();
+namespace ARDOUR {
+extern void setup_enum_writer ();
+}
/* this is useful for quite a few things that want to check
if any bounds-related property has changed
@@ -277,7 +279,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization)
Stateful::current_state_version = CURRENT_SESSION_FILE_VERSION;
- setup_enum_writer ();
+ ARDOUR::setup_enum_writer ();
// allow ardour the absolute maximum number of open files
lotsa_files_please ();
diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc
index 4bbedcecd8..9aa36304a6 100644
--- a/libs/ardour/midi_playlist.cc
+++ b/libs/ardour/midi_playlist.cc
@@ -21,6 +21,7 @@
#include <algorithm>
#include <iostream>
+#include <utility>
#include <stdlib.h>
@@ -257,10 +258,7 @@ MidiPlaylist::read (Evoral::EventSink<framepos_t>& dst, framepos_t start, framec
} else {
if (new_tracker) {
- pair<Region*,MidiStateTracker*> newpair;
- newpair.first = mr.get();
- newpair.second = tracker;
- _note_trackers.insert (newpair).first;
+ _note_trackers.insert (make_pair (mr.get(), tracker));
DEBUG_TRACE (DEBUG::MidiPlaylistIO, "\tadded tracker to trackers\n");
}
}
diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc
index 4ad563eec9..30f42aba19 100644
--- a/libs/ardour/midi_ring_buffer.cc
+++ b/libs/ardour/midi_ring_buffer.cc
@@ -25,9 +25,10 @@
#include "ardour/event_type_map.h"
using namespace std;
-using namespace ARDOUR;
using namespace PBD;
+namespace ARDOUR {
+
/** Read a block of MIDI events from this buffer into a MidiBuffer.
*
* Timestamps of events returned are relative to start (i.e. event with stamp 0
@@ -279,3 +280,4 @@ MidiRingBuffer<T>::reset_tracker ()
template class MidiRingBuffer<framepos_t>;
+} // namespace ARDOUR
diff --git a/libs/audiographer/audiographer/process_context.h b/libs/audiographer/audiographer/process_context.h
index b73f5d69d5..df00812c01 100644
--- a/libs/audiographer/audiographer/process_context.h
+++ b/libs/audiographer/audiographer/process_context.h
@@ -121,8 +121,9 @@ protected:
/// A process context that allocates and owns it's data buffer
template <typename T = DefaultSampleType>
-struct AllocatingProcessContext : public ProcessContext<T>
+class AllocatingProcessContext : public ProcessContext<T>
{
+public:
/// Allocates uninitialized memory
AllocatingProcessContext (framecnt_t frames, ChannelCount channels)
: ProcessContext<T> (new T[frames], frames, channels) {}
diff --git a/libs/evoral/evoral/ControlList.hpp b/libs/evoral/evoral/ControlList.hpp
index c54c231ca7..f7eba87ba6 100644
--- a/libs/evoral/evoral/ControlList.hpp
+++ b/libs/evoral/evoral/ControlList.hpp
@@ -35,7 +35,8 @@ class Curve;
/** A single event (time-stamped value) for a control
*/
-struct ControlEvent {
+class ControlEvent {
+public:
ControlEvent (double w, double v)
: when (w), value (v), coeff (0)
{}
diff --git a/libs/evoral/evoral/Event.hpp b/libs/evoral/evoral/Event.hpp
index 5c287fd714..747b795480 100644
--- a/libs/evoral/evoral/Event.hpp
+++ b/libs/evoral/evoral/Event.hpp
@@ -44,7 +44,8 @@ void init_event_id_counter(event_id_t n);
* Template parameter Time is the type of the time stamp used for this event.
*/
template<typename Time>
-struct Event {
+class Event {
+public:
#ifdef EVORAL_EVENT_ALLOC
Event (EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false);
diff --git a/libs/evoral/evoral/EventRingBuffer.hpp b/libs/evoral/evoral/EventRingBuffer.hpp
index 11d487f778..8fec622243 100644
--- a/libs/evoral/evoral/EventRingBuffer.hpp
+++ b/libs/evoral/evoral/EventRingBuffer.hpp
@@ -47,7 +47,7 @@ public:
EventRingBuffer(size_t capacity) : PBD::RingBufferNPT<uint8_t>(capacity)
{}
- size_t capacity() const { return bufsize(); }
+ inline size_t capacity() const { return bufsize(); }
/** Peek at the ringbuffer (read w/o advancing read pointer).
* @return how much has been peeked (wraps around if read exceeds
@@ -57,10 +57,10 @@ public:
* read-pointer---^
* </pre>
*/
- bool peek (uint8_t*, size_t size);
+ inline bool peek (uint8_t*, size_t size);
- uint32_t write(Time time, EventType type, uint32_t size, const uint8_t* buf);
- bool read (Time* time, EventType* type, uint32_t* size, uint8_t* buf);
+ inline uint32_t write(Time time, EventType type, uint32_t size, const uint8_t* buf);
+ inline bool read (Time* time, EventType* type, uint32_t* size, uint8_t* buf);
};
template<typename Time>
diff --git a/libs/evoral/evoral/MIDIEvent.hpp b/libs/evoral/evoral/MIDIEvent.hpp
index c695e7d7a9..e38f4f55db 100644
--- a/libs/evoral/evoral/MIDIEvent.hpp
+++ b/libs/evoral/evoral/MIDIEvent.hpp
@@ -36,7 +36,8 @@ namespace Evoral {
* valid MIDI data for these functions to make sense.
*/
template<typename Time>
-struct MIDIEvent : public Event<Time> {
+class MIDIEvent : public Event<Time> {
+public:
MIDIEvent(EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false)
: Event<Time>(type, time, size, buf, alloc)
{}
diff --git a/libs/evoral/src/libsmf/smf_save.c b/libs/evoral/src/libsmf/smf_save.c
index 0540232707..b99af75461 100644
--- a/libs/evoral/src/libsmf/smf_save.c
+++ b/libs/evoral/src/libsmf/smf_save.c
@@ -180,7 +180,6 @@ smf_format_vlq(unsigned char *buf, int length, unsigned long value)
}
assert(i <= length);
- length = length; // get rid of stupid gcc warnings about unused params if assert() is null
/* + 1, because "i" is an offset, not a count. */
return (i + 1);
diff --git a/libs/gtkmm2ext/gtkmm2ext/gui_thread.h b/libs/gtkmm2ext/gtkmm2ext/gui_thread.h
index 16dc0600a1..1e98a32b7b 100644
--- a/libs/gtkmm2ext/gtkmm2ext/gui_thread.h
+++ b/libs/gtkmm2ext/gtkmm2ext/gui_thread.h
@@ -26,7 +26,7 @@
#include <boost/bind/protect.hpp>
namespace sigc {
- class trackable;
+ struct trackable;
}
#define ENSURE_GUI_THREAD(obj,method, ...) if (!Gtkmm2ext::UI::instance()->caller_is_self()) { abort (); }
diff --git a/libs/midi++2/jack_midi_port.cc b/libs/midi++2/jack_midi_port.cc
index 05eebc5aa1..9d7fb8c70e 100644
--- a/libs/midi++2/jack_midi_port.cc
+++ b/libs/midi++2/jack_midi_port.cc
@@ -40,6 +40,10 @@ using namespace MIDI;
using namespace std;
using namespace PBD;
+namespace Evoral {
+template class EventRingBuffer<timestamp_t>;
+}
+
pthread_t JackMIDIPort::_process_thread;
Signal0<void> JackMIDIPort::JackHalted;
Signal0<void> JackMIDIPort::MakeConnections;
diff --git a/libs/midi++2/midi++/ipmidi_port.h b/libs/midi++2/midi++/ipmidi_port.h
index 0441626565..32cf1163e6 100644
--- a/libs/midi++2/midi++/ipmidi_port.h
+++ b/libs/midi++2/midi++/ipmidi_port.h
@@ -37,9 +37,6 @@
#include "pbd/signals.h"
#include "pbd/ringbuffer.h"
-#include "evoral/Event.hpp"
-#include "evoral/EventRingBuffer.hpp"
-
#include "midi++/types.h"
#include "midi++/parser.h"
#include "midi++/port.h"
diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h
index 03abd1a41c..89b0e283dc 100644
--- a/libs/midi++2/midi++/port.h
+++ b/libs/midi++2/midi++/port.h
@@ -29,9 +29,6 @@
#include "pbd/signals.h"
#include "pbd/ringbuffer.h"
-#include "evoral/Event.hpp"
-#include "evoral/EventRingBuffer.hpp"
-
#include "midi++/types.h"
#include "midi++/parser.h"
diff --git a/libs/midi++2/mtc.cc b/libs/midi++2/mtc.cc
index d1bb7c9bad..affe65ec68 100644
--- a/libs/midi++2/mtc.cc
+++ b/libs/midi++2/mtc.cc
@@ -300,7 +300,7 @@ Parser::process_mtc_quarter_frame (byte *msg)
switch (_mtc_running) {
case MTC_Forward:
- if ((which_quarter_frame == 7)) {
+ if (which_quarter_frame == 7) {
/* we've reached the final of 8 quarter frame messages.
store the time, reset the pending time holder,
diff --git a/libs/surfaces/control_protocol/control_protocol/control_protocol.h b/libs/surfaces/control_protocol/control_protocol/control_protocol.h
index 155c9236da..0c849064bb 100644
--- a/libs/surfaces/control_protocol/control_protocol/control_protocol.h
+++ b/libs/surfaces/control_protocol/control_protocol/control_protocol.h
@@ -146,7 +146,8 @@ class ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList,
};
extern "C" {
- struct ControlProtocolDescriptor {
+ class ControlProtocolDescriptor {
+ public:
const char* name; /* descriptive */
const char* id; /* unique and version-specific */
void* ptr; /* protocol can store a value here */
diff --git a/wscript b/wscript
index 935557bae3..c274ef93bf 100644
--- a/wscript
+++ b/wscript
@@ -128,10 +128,11 @@ def set_compiler_flags (conf,opt):
platform = u[0].lower()
version = u[2]
+ is_clang = conf.env['CXX'][0].endswith('clang++')
if opt.gprofile:
debug_flags = [ '-pg' ]
else:
- if platform != 'darwin':
+ if platform != 'darwin' and not is_clang:
debug_flags = [ '-rdynamic' ] # waf adds -O0 -g itself. thanks waf!
# Autodetect
@@ -214,7 +215,7 @@ def set_compiler_flags (conf,opt):
elif cpu == "i686":
optimization_flags.append ("-march=i686")
- if ((conf.env['build_target'] == 'i686') or (conf.env['build_target'] == 'x86_64')) and build_host_supports_sse:
+ if not is_clang and ((conf.env['build_target'] == 'i686') or (conf.env['build_target'] == 'x86_64')) and build_host_supports_sse:
optimization_flags.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"])
debug_flags.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"])