summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-04-15 19:28:44 +0000
committerCarl Hetherington <carl@carlh.net>2012-04-15 19:28:44 +0000
commit23973bae24b7f569e26c7f869a103aacbaf66ab2 (patch)
treea5c9004823ce44c6bef1473293c38d11d3b4ccc7
parent2c0f704f286f05ce1505f6eb882391222e770331 (diff)
A few tweaks to make Ardour build in GCC -std=c++0x mode.
git-svn-id: svn://localhost/ardour2/branches/3.0@11983 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/automation_line.cc2
-rw-r--r--gtk2_ardour/editor_xpms12
-rw-r--r--gtk2_ardour/mixer_strip.cc2
-rw-r--r--gtk2_ardour/mouse_cursors.cc8
-rw-r--r--gtk2_ardour/route_params_ui.h2
-rw-r--r--libs/ardour/midi_port.cc3
-rw-r--r--libs/ardour/midi_state_tracker.cc2
-rw-r--r--libs/ardour/midi_track.cc10
-rw-r--r--libs/evoral/src/ControlList.cpp2
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc2
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/dndvbox.h4
-rw-r--r--libs/surfaces/mackie/mackie_jog_wheel.cc1
12 files changed, 24 insertions, 26 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 263fe29b7b..5a7f6ddd21 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -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;
diff --git a/gtk2_ardour/editor_xpms b/gtk2_ardour/editor_xpms
index cb4a044cfd..c8b4e83a0c 100644
--- a/gtk2_ardour/editor_xpms
+++ b/gtk2_ardour/editor_xpms
@@ -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,
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 72d69d5e43..04688f983a 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -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))
diff --git a/gtk2_ardour/mouse_cursors.cc b/gtk2_ardour/mouse_cursors.cc
index 3cbe8342a7..fa3ce331d6 100644
--- a/gtk2_ardour/mouse_cursors.cc
+++ b/gtk2_ardour/mouse_cursors.cc
@@ -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);
}
diff --git a/gtk2_ardour/route_params_ui.h b/gtk2_ardour/route_params_ui.h
index 085949539b..4c8adfd9c6 100644
--- a/gtk2_ardour/route_params_ui.h
+++ b/gtk2_ardour/route_params_ui.h
@@ -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;
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index 6d09ddb52c..9a7d3eeb27 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -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
diff --git a/libs/ardour/midi_state_tracker.cc b/libs/ardour/midi_state_tracker.cc
index 7537ca04d1..7bf23f9358 100644
--- a/libs/ardour/midi_state_tracker.cc
+++ b/libs/ardour/midi_state_tracker.cc
@@ -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
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc
index e99df0ffb9..73f19e9224 100644
--- a/libs/ardour/midi_track.cc
+++ b/libs/ardour/midi_track.cc
@@ -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);
diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp
index 7bdb500d31..75b591d6a3 100644
--- a/libs/evoral/src/ControlList.cpp
+++ b/libs/evoral/src/ControlList.cpp
@@ -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 ();
}
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 30bb011efe..255b18b2fb 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -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);
diff --git a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h
index fdd6726654..bc5ca6c725 100644
--- a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h
+++ b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h
@@ -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));
diff --git a/libs/surfaces/mackie/mackie_jog_wheel.cc b/libs/surfaces/mackie/mackie_jog_wheel.cc
index 3ff3298627..86ea84ff65 100644
--- a/libs/surfaces/mackie/mackie_jog_wheel.cc
+++ b/libs/surfaces/mackie/mackie_jog_wheel.cc
@@ -11,7 +11,6 @@
#include <algorithm>
using namespace Mackie;
-using std::isnan;
JogWheel::JogWheel (MackieControlProtocol & mcp)
: _mcp (mcp)