diff options
author | David Robillard <d@drobilla.net> | 2009-02-26 00:58:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-26 00:58:35 +0000 |
commit | 03536cd399131e3fec54c95ae5ac6f11dca05aef (patch) | |
tree | ce73dfb9f1258c79f0e985840a12842154683479 /libs | |
parent | 3bc71af0ca89354670243e600c70374bfb224c6d (diff) |
Fix a bunch of warnings.
Clean up.
git-svn-id: svn://localhost/ardour2/branches/3.0@4668 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/plugin.h | 17 | ||||
-rw-r--r-- | libs/ardour/ardour/tempo.h | 2 | ||||
-rw-r--r-- | libs/ardour/export_format_specification.cc | 53 | ||||
-rw-r--r-- | libs/ardour/export_utilities.cc | 6 | ||||
-rw-r--r-- | libs/ardour/io.cc | 2 | ||||
-rw-r--r-- | libs/ardour/midi_port.cc | 3 | ||||
-rw-r--r-- | libs/ardour/panner.cc | 2 | ||||
-rw-r--r-- | libs/ardour/plugin.cc | 10 | ||||
-rw-r--r-- | libs/ardour/smf_source.cc | 1 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 2 |
10 files changed, 50 insertions, 48 deletions
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 (); } |