A few tweaks to make Ardour build in GCC -std=c++0x mode.
authorCarl Hetherington <carl@carlh.net>
Sun, 15 Apr 2012 19:28:44 +0000 (19:28 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 15 Apr 2012 19:28:44 +0000 (19:28 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11983 d708f5d6-7413-0410-9779-e7cbd77b26cf

12 files changed:
gtk2_ardour/automation_line.cc
gtk2_ardour/editor_xpms
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mouse_cursors.cc
gtk2_ardour/route_params_ui.h
libs/ardour/midi_port.cc
libs/ardour/midi_state_tracker.cc
libs/ardour/midi_track.cc
libs/evoral/src/ControlList.cpp
libs/gtkmm2ext/gtk_ui.cc
libs/gtkmm2ext/gtkmm2ext/dndvbox.h
libs/surfaces/mackie/mackie_jog_wheel.cc

index 263fe29b7bc764897c79d2c27a481698ea02e3da..5a7f6ddd2156259b85fe95425b834767ac628088 100644 (file)
@@ -830,7 +830,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
 
                model_to_view_coord (tx, ty);
 
-               if (isnan (tx) || isnan (ty)) {
+               if (std::isnan (tx) || std::isnan (ty)) {
                        warning << string_compose (_("Ignoring illegal points on AutomationLine \"%1\""),
                                                   _name) << endmsg;
                        continue;
index cb4a044cfd5437f387cf1e802566df3fd5096dd4..c8b4e83a0c6beb70903cd63731af29c76e361e6f 100644 (file)
@@ -3,7 +3,7 @@
 #define fader_cursor_height 25
 #define fader_cursor_x_hot 3
 #define fader_cursor_y_hot 21
-static const gchar fader_cursor_bits[] = {
+static const unsigned char fader_cursor_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00,
    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x02, 0x01,
    0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x02, 0x01,
@@ -15,7 +15,7 @@ static const gchar fader_cursor_bits[] = {
    0x00, 0x00, 0x00, 0x00 };
 
 /* Created with The GIMP */
-static const gchar fader_cursor_mask_bits[] = {
+static const unsigned char fader_cursor_mask_bits[] = {
    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x78, 0x00,
    0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x01,
    0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x01,
@@ -31,7 +31,7 @@ static const gchar fader_cursor_mask_bits[] = {
 #define speaker_cursor_height 26
 #define speaker_cursor_x_hot 0
 #define speaker_cursor_y_hot 0
-static const gchar speaker_cursor_bits[] = {
+static const unsigned char speaker_cursor_bits[] = {
    0x00, 0xc0, 0x00, 0xc0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xcc, 0x00, 0xcc,
    0xff, 0xc3, 0xff, 0xc3, 0x03, 0xc0, 0x03, 0xc0, 0xc3, 0xc0, 0xc3, 0xc0,
    0xc3, 0xc0, 0xc3, 0xc0, 0xc3, 0xc0, 0xc3, 0xc0, 0x03, 0xc0, 0x03, 0xc0,
@@ -42,7 +42,7 @@ static const gchar speaker_cursor_bits[] = {
 #define speaker_cursor_mask_height 26
 #define speaker_cursor_mask_x_hot 0
 #define speaker_cursor_mask_y_hot 0
-static const gchar speaker_cursor_mask_bits[] = {
+static const unsigned char speaker_cursor_mask_bits[] = {
    0x00, 0xc0, 0x00, 0xc0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0xfc,
    0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff,
@@ -85,7 +85,7 @@ static const short cursor_timestretch_mask_bits[] = {
 #define cursor_zoom_height 16
 #define cursor_zoom_x_hot 6
 #define cursor_zoom_y_hot 6
-static const short cursor_zoom_bits[] = {
+static const unsigned short cursor_zoom_bits[] = {
    0x00e0, 0x0000, 0x03b8, 0x0000, 0x0604, 0x0000, 0x0806, 0x0000, 0x0842,
    0x0000, 0x1843, 0x0000, 0x11f1, 0x0000, 0x1843, 0x0000, 0x0842, 0x0000,
    0x1806, 0x0000, 0x2604, 0x0000, 0x4758, 0x0000, 0x88e0, 0x0000, 0x1000,
@@ -95,7 +95,7 @@ static const short cursor_zoom_bits[] = {
 #define cursor_zoom_mask_height 16
 #define cursor_zoom_mask_x_hot 6
 #define cursor_zoom_mask_y_hot 6
-static const short cursor_zoom_mask_bits[] = {
+static const unsigned short cursor_zoom_mask_bits[] = {
    0x00e0, 0x0000, 0x03f8, 0x0000, 0x07fc, 0x0000, 0x0ffe, 0x0000, 0x0ffe,
    0x0000, 0x1fff, 0x0000, 0x1fff, 0x0000, 0x1fff, 0x0000, 0x0ffe, 0x0000,
    0x1ffe, 0x0000, 0x3ffc, 0x0000, 0x7ff8, 0x0000, 0xf8e0, 0x0000, 0xf000,
index 72d69d5e43fb6e1d6946e3000612f907e79677f3..04688f983a70a35a84af17aadd13fd38b620fc1f 100644 (file)
@@ -112,7 +112,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, boost::shared_ptr<Route> rt
        , RouteUI (sess)
        , _mixer(mx)
        , _mixer_owned (in_mixer)
-       , processor_box (sess, sigc::mem_fun(*this, &MixerStrip::plugin_selector), mx.selection(), this, in_mixer)
+       , processor_box (sess, boost::bind (&MixerStrip::plugin_selector, this), mx.selection(), this, in_mixer)
        , gpm (sess, 250)
        , panners (sess)
        , button_size_group (Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL))
index 3cbe8342a7f079d0e4436a73781eec1c639f56a6..fa3ce331d660bcd28d272c6f4f2a86a5d6755951 100644 (file)
@@ -41,14 +41,14 @@ MouseCursors::MouseCursors ()
        Color ffg ("#000000");
 
        {
-               RefPtr<Bitmap> source = Bitmap::create (fader_cursor_bits, fader_cursor_width, fader_cursor_height);
-               RefPtr<Bitmap> mask = Bitmap::create (fader_cursor_mask_bits, fader_cursor_width, fader_cursor_height);
+               RefPtr<Bitmap> source = Bitmap::create ((char const *) fader_cursor_bits, fader_cursor_width, fader_cursor_height);
+               RefPtr<Bitmap> mask = Bitmap::create ((char const *) fader_cursor_mask_bits, fader_cursor_width, fader_cursor_height);
                fader = new Cursor (source, mask, ffg, fbg, fader_cursor_x_hot, fader_cursor_y_hot);
        }
 
        {
-               RefPtr<Bitmap> source = Bitmap::create (speaker_cursor_bits, speaker_cursor_width, speaker_cursor_height);
-               RefPtr<Bitmap> mask = Bitmap::create (speaker_cursor_mask_bits, speaker_cursor_width, speaker_cursor_height);
+               RefPtr<Bitmap> source = Bitmap::create ((char const *) speaker_cursor_bits, speaker_cursor_width, speaker_cursor_height);
+               RefPtr<Bitmap> mask = Bitmap::create ((char const *) speaker_cursor_mask_bits, speaker_cursor_width, speaker_cursor_height);
                speaker = new Cursor (source, mask, ffg, fbg, speaker_cursor_x_hot, speaker_cursor_y_hot);
        }
 
index 085949539bc2244db3f993fe1d3f535282ee49e0..4c8adfd9c66878e099ae09072435502d3c70a7c9 100644 (file)
@@ -63,7 +63,7 @@ class RouteParams_UI : public ArdourWindow, public PBD::ScopedConnectionList
 
        void set_session (ARDOUR::Session*);
        void session_going_away ();
-       PluginSelector*  plugin_selector() { return _plugin_selector; }
+       PluginSelector* plugin_selector() { return _plugin_selector; }
 
   private:
        Gtk::HBox                global_hpacker;
index 6d09ddb52c142ff8fdd515246150ff546b30bc49..9a7d3eeb27fdfee4a716671d35fcd7b1583e9780 100644 (file)
@@ -128,10 +128,9 @@ MidiPort::cycle_split ()
 void
 MidiPort::resolve_notes (void* jack_buffer, MidiBuffer::TimeType when)
 {
-
        for (uint8_t channel = 0; channel <= 0xF; channel++) {
 
-               uint8_t ev[3] = { MIDI_CMD_CONTROL | channel, MIDI_CTL_SUSTAIN, 0 };
+               uint8_t ev[3] = { ((uint8_t) (MIDI_CMD_CONTROL | channel)), MIDI_CTL_SUSTAIN, 0 };
 
                /* we need to send all notes off AND turn the
                 * sustain/damper pedal off to handle synths
index 7537ca04d1d4346722c0ed0472fc66f6e6392d51..7bf23f93583fd2973908d795ea1e839ac0aed008 100644 (file)
@@ -131,7 +131,7 @@ MidiStateTracker::resolve_notes (MidiBuffer &dst, framepos_t time)
        for (int channel = 0; channel < 16; ++channel) {
                for (int note = 0; note < 128; ++note) {
                        while (_active_notes[note + 128 * channel]) {
-                               uint8_t buffer[3] = { MIDI_CMD_NOTE_OFF | channel, note, 0 };
+                               uint8_t buffer[3] = { ((uint8_t) (MIDI_CMD_NOTE_OFF | channel)), uint8_t (note), 0 };
                                Evoral::MIDIEvent<MidiBuffer::TimeType> noteoff
                                        (MIDI_CMD_NOTE_OFF, time, 3, buffer, false);
                                /* note that we do not care about failure from
index e99df0ffb952417ceb8e3b4ab9dba6ae11b49de1..73f19e92247a6ee34928bfe2a30fb67c1e234cc0 100644 (file)
@@ -525,7 +525,7 @@ MidiTrack::midi_panic()
 {
        DEBUG_TRACE (DEBUG::MidiIO, string_compose ("%1 delivers panic data\n", name()));
        for (uint8_t channel = 0; channel <= 0xF; channel++) {
-               uint8_t ev[3] = { MIDI_CMD_CONTROL | channel, MIDI_CTL_SUSTAIN, 0 };
+               uint8_t ev[3] = { ((uint8_t) (MIDI_CMD_CONTROL | channel)), ((uint8_t) MIDI_CTL_SUSTAIN), 0 };
                write_immediate_event(3, ev);
                ev[1] = MIDI_CTL_ALL_NOTES_OFF;
                write_immediate_event(3, ev);
@@ -551,9 +551,9 @@ void
 MidiTrack::MidiControl::set_value(double val)
 {
        bool valid = false;
-       if (isinf(val)) {
+       if (std::isinf(val)) {
                cerr << "MIDIControl value is infinity" << endl;
-       } else if (isnan(val)) {
+       } else if (std::isnan(val)) {
                cerr << "MIDIControl value is NaN" << endl;
        } else if (val < _list->parameter().min()) {
                cerr << "MIDIControl value is < " << _list->parameter().min() << endl;
@@ -570,7 +570,7 @@ MidiTrack::MidiControl::set_value(double val)
        assert(val <= _list->parameter().max());
        if ( ! automation_playback()) {
                size_t size = 3;
-               uint8_t ev[3] = { _list->parameter().channel(), int(val), 0 };
+               uint8_t ev[3] = { _list->parameter().channel(), uint8_t (val), 0 };
                switch(_list->parameter().type()) {
                case MidiCCAutomation:
                        ev[0] += MIDI_CMD_CONTROL;
@@ -733,7 +733,7 @@ MidiTrack::act_on_mute ()
                        if ((1<<channel) & mask) {
 
                                DEBUG_TRACE (DEBUG::MidiIO, string_compose ("%1 delivers mute message to channel %2\n", name(), channel+1));
-                               uint8_t ev[3] = { MIDI_CMD_CONTROL | channel, MIDI_CTL_SUSTAIN, 0 };
+                               uint8_t ev[3] = { ((uint8_t) (MIDI_CMD_CONTROL | channel)), MIDI_CTL_SUSTAIN, 0 };
                                write_immediate_event (3, ev);
                                ev[1] = MIDI_CTL_ALL_NOTES_OFF;
                                write_immediate_event (3, ev);
index 7bdb500d3165e83424219dd531cbbdd53038f6ce..75b591d6a3dcbbaabb37cb5349777c778a0dacfb 100644 (file)
@@ -679,7 +679,7 @@ ControlList::modify (iterator iter, double when, double val)
                (*iter)->when = when;
                (*iter)->value = val;
 
-               if (isnan (val)) {
+               if (std::isnan (val)) {
                        abort ();
                }
 
index 30bb011efe33d966ce1b54dea2717e401ce08357..255b18b2fb4bc65bac6bb676975aac1015a5b8f1 100644 (file)
@@ -104,7 +104,7 @@ UI::UI (string namestr, int *argc, char ***argv)
        errors->set_title (title.get_string());
 
        errors->dismiss_button().set_name ("ErrorLogCloseButton");
-       errors->signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), (Window *) errors));
+       errors->signal_delete_event().connect (sigc::bind (sigc::ptr_fun (just_hide_it), (Window *) errors));
        errors->set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY);
 
        //load_rcfile (rcfile);
index fdd672665415522f7801f2f46015ae6142734cc8..bc5ca6c7255dbef61a2272cd7574f97e32e400f7 100644 (file)
@@ -57,8 +57,8 @@ public:
                        Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK
                        );
 
-               signal_button_press_event().connect (bind (mem_fun (*this, &DnDVBox::button_press), (T *) 0));
-               signal_button_release_event().connect (bind (mem_fun (*this, &DnDVBox::button_release), (T *) 0));
+               signal_button_press_event().connect (sigc::bind (mem_fun (*this, &DnDVBox::button_press), (T *) 0));
+               signal_button_release_event().connect (sigc::bind (mem_fun (*this, &DnDVBox::button_release), (T *) 0));
                signal_drag_motion().connect (mem_fun (*this, &DnDVBox::drag_motion));
                signal_drag_leave().connect (mem_fun (*this, &DnDVBox::drag_leave));
 
index 3ff3298627d9337ff0775b3a3458a0e2ed0b7c6a..86ea84ff65b4335ea27dd94bef3cd69297747cba 100644 (file)
@@ -11,7 +11,6 @@
 #include <algorithm>
 
 using namespace Mackie;
-using std::isnan;
 
 JogWheel::JogWheel (MackieControlProtocol & mcp)
 : _mcp (mcp)