Push2: Drop "using namespace std"

No functional changes, just makes some more context explicit like the previous
commit.
This commit is contained in:
David Robillard 2021-06-18 20:31:35 -04:00 committed by Paul Davis
parent 61088a1a01
commit c4632da2e7
10 changed files with 65 additions and 72 deletions

View file

@ -40,7 +40,6 @@
using namespace PBD; using namespace PBD;
using namespace ARDOUR; using namespace ARDOUR;
using namespace ArdourSurface; using namespace ArdourSurface;
using namespace std;
using namespace Gtk; using namespace Gtk;
using namespace Gtkmm2ext; using namespace Gtkmm2ext;
@ -92,7 +91,7 @@ P2GUI::P2GUI (Push2& p)
_table.set_homogeneous (false); _table.set_homogeneous (false);
std::string data_file_path; std::string data_file_path;
string name = "push2-small.png"; std::string name = "push2-small.png";
Searchpath spath(ARDOUR::ardour_data_search_path()); Searchpath spath(ARDOUR::ardour_data_search_path());
spath.add_subdirectory_to_paths ("icons"); spath.add_subdirectory_to_paths ("icons");
find_file (spath, name, data_file_path); find_file (spath, name, data_file_path);
@ -170,8 +169,8 @@ P2GUI::connection_handler ()
void void
P2GUI::update_port_combos () P2GUI::update_port_combos ()
{ {
vector<string> midi_inputs; std::vector<std::string> midi_inputs;
vector<string> midi_outputs; std::vector<std::string> midi_outputs;
ARDOUR::AudioEngine::instance()->get_ports ("", ARDOUR::DataType::MIDI, ARDOUR::PortFlags (ARDOUR::IsOutput|ARDOUR::IsTerminal), midi_inputs); ARDOUR::AudioEngine::instance()->get_ports ("", ARDOUR::DataType::MIDI, ARDOUR::PortFlags (ARDOUR::IsOutput|ARDOUR::IsTerminal), midi_inputs);
ARDOUR::AudioEngine::instance()->get_ports ("", ARDOUR::DataType::MIDI, ARDOUR::PortFlags (ARDOUR::IsInput|ARDOUR::IsTerminal), midi_outputs); ARDOUR::AudioEngine::instance()->get_ports ("", ARDOUR::DataType::MIDI, ARDOUR::PortFlags (ARDOUR::IsInput|ARDOUR::IsTerminal), midi_outputs);
@ -192,7 +191,7 @@ P2GUI::update_port_combos ()
for (n = 1; i != children.end(); ++i, ++n) { for (n = 1; i != children.end(); ++i, ++n) {
string port_name = (*i)[_midi_port_columns.full_name]; std::string port_name = (*i)[_midi_port_columns.full_name];
if (_p2.input_port()->connected_to (port_name)) { if (_p2.input_port()->connected_to (port_name)) {
_input_combo.set_active (n); _input_combo.set_active (n);
input_found = true; input_found = true;
@ -209,7 +208,7 @@ P2GUI::update_port_combos ()
++i; /* skip "Disconnected" */ ++i; /* skip "Disconnected" */
for (n = 1; i != children.end(); ++i, ++n) { for (n = 1; i != children.end(); ++i, ++n) {
string port_name = (*i)[_midi_port_columns.full_name]; std::string port_name = (*i)[_midi_port_columns.full_name];
if (_p2.output_port()->connected_to (port_name)) { if (_p2.output_port()->connected_to (port_name)) {
_output_combo.set_active (n); _output_combo.set_active (n);
output_found = true; output_found = true;
@ -223,16 +222,16 @@ P2GUI::update_port_combos ()
} }
Glib::RefPtr<Gtk::ListStore> Glib::RefPtr<Gtk::ListStore>
P2GUI::build_midi_port_list (vector<string> const & ports, bool for_input) P2GUI::build_midi_port_list (std::vector<std::string> const & ports, bool for_input)
{ {
Glib::RefPtr<Gtk::ListStore> store = ListStore::create (_midi_port_columns); Glib::RefPtr<Gtk::ListStore> store = ListStore::create (_midi_port_columns);
TreeModel::Row row; TreeModel::Row row;
row = *store->append (); row = *store->append ();
row[_midi_port_columns.full_name] = string(); row[_midi_port_columns.full_name] = std::string();
row[_midi_port_columns.short_name] = _("Disconnected"); row[_midi_port_columns.short_name] = _("Disconnected");
for (vector<string>::const_iterator p = ports.begin(); p != ports.end(); ++p) { for (std::vector<std::string>::const_iterator p = ports.begin(); p != ports.end(); ++p) {
row = *store->append (); row = *store->append ();
row[_midi_port_columns.full_name] = *p; row[_midi_port_columns.full_name] = *p;
std::string pn = ARDOUR::AudioEngine::instance()->get_pretty_name_by_name (*p); std::string pn = ARDOUR::AudioEngine::instance()->get_pretty_name_by_name (*p);
@ -253,7 +252,7 @@ P2GUI::active_port_changed (Gtk::ComboBox* combo, bool for_input)
} }
TreeModel::iterator active = combo->get_active (); TreeModel::iterator active = combo->get_active ();
string new_port = (*active)[_midi_port_columns.full_name]; std::string new_port = (*active)[_midi_port_columns.full_name];
if (new_port.empty()) { if (new_port.empty()) {
if (for_input) { if (for_input) {
@ -312,6 +311,6 @@ P2GUI::reprogram_pressure_mode ()
pm = Push2::AfterTouch; pm = Push2::AfterTouch;
} }
cerr << "Reprogram pm to " << pm << endl; std::cerr << "Reprogram pm to " << pm << std::endl;
_p2.set_pressure_mode (pm); _p2.set_pressure_mode (pm);
} }

View file

@ -27,7 +27,6 @@
using namespace ARDOUR; using namespace ARDOUR;
using namespace PBD; using namespace PBD;
using namespace std;
using namespace ArdourSurface; using namespace ArdourSurface;
static ControlProtocol* static ControlProtocol*
@ -39,7 +38,7 @@ new_push2 (ControlProtocolDescriptor*, Session* s)
p2 = new Push2 (*s); p2 = new Push2 (*s);
/* do not set active here - wait for set_state() */ /* do not set active here - wait for set_state() */
} }
catch (exception & e) { catch (std::exception & e) {
error << "Error instantiating Push2 support: " << e.what() << endmsg; error << "Error instantiating Push2 support: " << e.what() << endmsg;
delete p2; delete p2;
p2 = 0; p2 = 0;
@ -55,9 +54,9 @@ delete_push2 (ControlProtocolDescriptor*, ControlProtocol* cp)
{ {
delete cp; delete cp;
} }
catch ( exception & e ) catch ( std::exception & e )
{ {
cout << "Exception caught trying to finalize Push2 support: " << e.what() << endl; std::cout << "Exception caught trying to finalize Push2 support: " << e.what() << std::endl;
} }
} }

View file

@ -38,7 +38,6 @@
using namespace ARDOUR; using namespace ARDOUR;
using namespace PBD; using namespace PBD;
using namespace Gtkmm2ext; using namespace Gtkmm2ext;
using namespace std;
using namespace ArdourSurface; using namespace ArdourSurface;
using namespace ArdourCanvas; using namespace ArdourCanvas;
@ -72,7 +71,7 @@ LevelMeter::~LevelMeter ()
_configuration_connection.disconnect(); _configuration_connection.disconnect();
_meter_type_connection.disconnect(); _meter_type_connection.disconnect();
_parameter_connection.disconnect(); _parameter_connection.disconnect();
for (vector<MeterInfo>::iterator i = _meters.begin(); i != _meters.end(); i++) { for (std::vector<MeterInfo>::iterator i = _meters.begin(); i != _meters.end(); ++i) {
delete (*i).meter; delete (*i).meter;
} }
_meters.clear(); _meters.clear();
@ -136,7 +135,7 @@ static float vu_standard() {
float float
LevelMeter::update_meters () LevelMeter::update_meters ()
{ {
vector<MeterInfo>::iterator i; std::vector<MeterInfo>::iterator i;
uint32_t n; uint32_t n;
if (!_meter) { if (!_meter) {
@ -191,10 +190,10 @@ LevelMeter::update_meters ()
} }
void void
LevelMeter::parameter_changed (string p) LevelMeter::parameter_changed (std::string p)
{ {
if (p == "meter-hold") { if (p == "meter-hold") {
vector<MeterInfo>::iterator i; std::vector<MeterInfo>::iterator i;
uint32_t n; uint32_t n;
for (n = 0, i = _meters.begin(); i != _meters.end(); ++i, ++n) { for (n = 0, i = _meters.begin(); i != _meters.end(); ++i, ++n) {
@ -209,7 +208,7 @@ LevelMeter::parameter_changed (string p)
setup_meters (_meter_length, _regular_meter_width, _thin_meter_width); setup_meters (_meter_length, _regular_meter_width, _thin_meter_width);
} }
else if (p == "meter-peak") { else if (p == "meter-peak") {
vector<MeterInfo>::iterator i; std::vector<MeterInfo>::iterator i;
uint32_t n; uint32_t n;
for (n = 0, i = _meters.begin(); i != _meters.end(); ++i, ++n) { for (n = 0, i = _meters.begin(); i != _meters.end(); ++i, ++n) {
@ -233,7 +232,7 @@ LevelMeter::meter_type_changed (MeterType t)
void void
LevelMeter::hide_all_meters () LevelMeter::hide_all_meters ()
{ {
for (vector<MeterInfo>::iterator i = _meters.begin(); i != _meters.end(); ++i) { for (std::vector<MeterInfo>::iterator i = _meters.begin(); i != _meters.end(); ++i) {
if ((*i).packed) { if ((*i).packed) {
_meter_packer->remove ((*i).meter); _meter_packer->remove ((*i).meter);
(*i).packed = false; (*i).packed = false;
@ -486,7 +485,7 @@ LevelMeter::setup_meters (int len, int initial_width, int thin_width)
void LevelMeter::clear_meters (bool reset_highlight) void LevelMeter::clear_meters (bool reset_highlight)
{ {
for (vector<MeterInfo>::iterator i = _meters.begin(); i < _meters.end(); i++) { for (std::vector<MeterInfo>::iterator i = _meters.begin(); i < _meters.end(); ++i) {
(*i).meter->clear(); (*i).meter->clear();
(*i).max_peak = minus_infinity(); (*i).max_peak = minus_infinity();
if (reset_highlight) if (reset_highlight)

View file

@ -40,13 +40,12 @@
#endif #endif
using namespace ARDOUR; using namespace ARDOUR;
using namespace std;
using namespace PBD; using namespace PBD;
using namespace Glib; using namespace Glib;
using namespace ArdourSurface; using namespace ArdourSurface;
using namespace ArdourCanvas; using namespace ArdourCanvas;
Push2Menu::Push2Menu (Item* parent, vector<string> s) Push2Menu::Push2Menu (Item* parent, std::vector<std::string> s)
: Container (parent) : Container (parent)
, _baseline (-1) , _baseline (-1)
, _ncols (0) , _ncols (0)
@ -70,7 +69,7 @@ Push2Menu::Push2Menu (Item* parent, vector<string> s)
_active_bg = new ArdourCanvas::Rectangle (this); _active_bg = new ArdourCanvas::Rectangle (this);
for (vector<string>::iterator si = s.begin(); si != s.end(); ++si) { for (std::vector<std::string>::iterator si = s.begin(); si != s.end(); ++si) {
Text* t = new Text (this); Text* t = new Text (this);
t->set_font_description (fd); t->set_font_description (fd);
t->set (*si); t->set (*si);
@ -96,7 +95,7 @@ Push2Menu::rearrange (uint32_t initial_display)
return; return;
} }
vector<Text*>::iterator i = _displays.begin(); std::vector<Text*>::iterator i = _displays.begin();
/* move to first */ /* move to first */
@ -182,7 +181,7 @@ Push2Menu::scroll (Direction dir, bool page)
case DirectionLeft: case DirectionLeft:
if (page) { if (page) {
set_active (max (0, (int) (_first - (_nrows * _ncols)))); set_active (std::max (0, (int) (_first - (_nrows * _ncols))));
} else { } else {
if (_active / _nrows == 0) { if (_active / _nrows == 0) {
/* in the first column, go to last column, same row */ /* in the first column, go to last column, same row */
@ -198,7 +197,7 @@ Push2Menu::scroll (Direction dir, bool page)
case DirectionRight: case DirectionRight:
if (page) { if (page) {
set_active (min ((uint32_t) _displays.size(), _first + (_nrows * _ncols))); set_active (std::min ((uint32_t) _displays.size(), _first + (_nrows * _ncols)));
} else { } else {
if (_active / _nrows == _ncols) { if (_active / _nrows == _ncols) {
/* in the last column, go to same row in first column */ /* in the last column, go to same row in first column */
@ -270,7 +269,7 @@ Push2Menu::set_text_color (Gtkmm2ext::Color c)
{ {
_text_color = c; _text_color = c;
for (vector<Text*>::iterator t = _displays.begin(); t != _displays.end(); ++t) { for (std::vector<Text*>::iterator t = _displays.begin(); t != _displays.end(); ++t) {
(*t)->set_color (c); (*t)->set_color (c);
} }
@ -295,7 +294,7 @@ Push2Menu::set_font_description (Pango::FontDescription fd)
{ {
_font_description = fd; _font_description = fd;
for (vector<Text*>::iterator t = _displays.begin(); t != _displays.end(); ++t) { for (std::vector<Text*>::iterator t = _displays.begin(); t != _displays.end(); ++t) {
(*t)->set_font_description (fd); (*t)->set_font_description (fd);
} }
} }

View file

@ -26,8 +26,6 @@
#include <iomanip> #include <iomanip>
#include <stdexcept> #include <stdexcept>
using namespace std;
MidiByteArray::MidiByteArray (size_t size, MIDI::byte array[]) MidiByteArray::MidiByteArray (size_t size, MIDI::byte array[])
: std::vector<MIDI::byte>() : std::vector<MIDI::byte>()
{ {
@ -67,21 +65,21 @@ MidiByteArray & operator << (MidiByteArray & mba, const MIDI::byte & b)
MidiByteArray & operator << (MidiByteArray & mba, const MidiByteArray & barr) MidiByteArray & operator << (MidiByteArray & mba, const MidiByteArray & barr)
{ {
back_insert_iterator<MidiByteArray> bit (mba); std::back_insert_iterator<MidiByteArray> bit (mba);
copy (barr.begin(), barr.end(), bit); copy (barr.begin(), barr.end(), bit);
return mba; return mba;
} }
ostream & operator << (ostream & os, const MidiByteArray & mba) std::ostream & operator << (std::ostream & os, const MidiByteArray & mba)
{ {
os << "["; os << "[";
char fill = os.fill('0'); char fill = os.fill('0');
for (MidiByteArray::const_iterator it = mba.begin(); it != mba.end(); ++it) { for (MidiByteArray::const_iterator it = mba.begin(); it != mba.end(); ++it) {
if (it != mba.begin()) os << " "; if (it != mba.begin()) os << " ";
os << hex << setw(2) << (int)*it; os << std::hex << std::setw(2) << (int)*it;
} }
os.fill (fill); os.fill (fill);
os << dec; os << std::dec;
os << "]"; os << "]";
return os; return os;
} }

View file

@ -67,7 +67,6 @@
#endif #endif
using namespace ARDOUR; using namespace ARDOUR;
using namespace std;
using namespace PBD; using namespace PBD;
using namespace Glib; using namespace Glib;
using namespace ArdourSurface; using namespace ArdourSurface;
@ -113,7 +112,7 @@ MixLayout::MixLayout (Push2& p, Session & s, std::string const & name)
t->set_color (_p2.get_color (Push2::ParameterName)); t->set_color (_p2.get_color (Push2::ParameterName));
t->set_position (Duple (10 + (n*Push2Canvas::inter_button_spacing()), 5)); t->set_position (Duple (10 + (n*Push2Canvas::inter_button_spacing()), 5));
string txt; std::string txt;
switch (n) { switch (n) {
case 0: case 0:
txt = _("Volumes"); txt = _("Volumes");
@ -424,8 +423,12 @@ MixLayout::strip_vpot (int n, int delta)
boost::shared_ptr<Controllable> ac = gain_meter[n]->knob->controllable(); boost::shared_ptr<Controllable> ac = gain_meter[n]->knob->controllable();
if (ac) { if (ac) {
ac->set_value (ac->interface_to_internal ( ac->set_value (
min (ac->upper(), max (ac->lower(), ac->internal_to_interface (ac->get_value()) + (delta/256.0)))), ac->interface_to_internal (
std::min (ac->upper (),
std::max (ac->lower (),
ac->internal_to_interface (ac->get_value ()) +
(delta / 256.0)))),
PBD::Controllable::UseGroup); PBD::Controllable::UseGroup);
} }
} }
@ -512,8 +515,8 @@ MixLayout::mute_changed (uint32_t n)
void void
MixLayout::solo_mute_changed (uint32_t n) MixLayout::solo_mute_changed (uint32_t n)
{ {
string shortname = short_version (_stripable[n]->name(), 10); std::string shortname = short_version (_stripable[n]->name(), 10);
string text; std::string text;
boost::shared_ptr<AutomationControl> ac; boost::shared_ptr<AutomationControl> ac;
ac = _stripable[n]->solo_control(); ac = _stripable[n]->solo_control();
if (ac && ac->get_value()) { if (ac && ac->get_value()) {
@ -648,13 +651,13 @@ MixLayout::switch_bank (uint32_t base)
void void
MixLayout::button_right () MixLayout::button_right ()
{ {
switch_bank (max (0, _bank_start + 8)); switch_bank (std::max (0, _bank_start + 8));
} }
void void
MixLayout::button_left () MixLayout::button_left ()
{ {
switch_bank (max (0, _bank_start - 8)); switch_bank (std::max (0, _bank_start - 8));
} }

View file

@ -66,7 +66,6 @@
#endif #endif
using namespace ARDOUR; using namespace ARDOUR;
using namespace std;
using namespace PBD; using namespace PBD;
using namespace Glib; using namespace Glib;
using namespace ArdourSurface; using namespace ArdourSurface;
@ -78,7 +77,7 @@ using namespace Gtkmm2ext;
#define PUSH2 0x1967 #define PUSH2 0x1967
Push2::Push2 (ARDOUR::Session& s) Push2::Push2 (ARDOUR::Session& s)
: ControlProtocol (s, string (X_("Ableton Push 2"))) : ControlProtocol (s, std::string (X_("Ableton Push 2")))
, AbstractUI<Push2Request> (name()) , AbstractUI<Push2Request> (name())
, _handle (0) , _handle (0)
, _in_use (false) , _in_use (false)
@ -628,7 +627,7 @@ Push2::handle_midi_controller_message (MIDI::Parser&, MIDI::EventTwoBytes* ev)
if (ev->value) { if (ev->value) {
/* any press cancels any pending long press timeouts */ /* any press cancels any pending long press timeouts */
for (set<ButtonID>::iterator x = _buttons_down.begin(); x != _buttons_down.end(); ++x) { for (std::set<ButtonID>::iterator x = _buttons_down.begin(); x != _buttons_down.end(); ++x) {
boost::shared_ptr<Button> bb = _id_button_map[*x]; boost::shared_ptr<Button> bb = _id_button_map[*x];
bb->timeout_connection.disconnect (); bb->timeout_connection.disconnect ();
} }
@ -647,7 +646,7 @@ Push2::handle_midi_controller_message (MIDI::Parser&, MIDI::EventTwoBytes* ev)
} }
set<ButtonID>::iterator c = _consumed.find (button->id); std::set<ButtonID>::iterator c = _consumed.find (button->id);
if (c == _consumed.end()) { if (c == _consumed.end()) {
if (ev->value == 0) { if (ev->value == 0) {
@ -1177,14 +1176,14 @@ Push2::port_registration_handler ()
/* the origin of the numeric magic identifiers is known only to Ableton /* the origin of the numeric magic identifiers is known only to Ableton
and may change in time. This is part of how CoreMIDI works. and may change in time. This is part of how CoreMIDI works.
*/ */
string input_port_name = X_("system:midi_capture_1319078870"); std::string input_port_name = X_("system:midi_capture_1319078870");
string output_port_name = X_("system:midi_playback_3409210341"); std::string output_port_name = X_("system:midi_playback_3409210341");
#else #else
string input_port_name = X_("Ableton Push 2 MIDI 1 in"); std::string input_port_name = X_("Ableton Push 2 MIDI 1 in");
string output_port_name = X_("Ableton Push 2 MIDI 1 out"); std::string output_port_name = X_("Ableton Push 2 MIDI 1 out");
#endif #endif
vector<string> in; std::vector<std::string> in;
vector<string> out; std::vector<std::string> out;
AudioEngine::instance()->get_ports (string_compose (".*%1", input_port_name), DataType::MIDI, PortFlags (IsPhysical|IsOutput), in); AudioEngine::instance()->get_ports (string_compose (".*%1", input_port_name), DataType::MIDI, PortFlags (IsPhysical|IsOutput), in);
AudioEngine::instance()->get_ports (string_compose (".*%1", output_port_name), DataType::MIDI, PortFlags (IsPhysical|IsInput), out); AudioEngine::instance()->get_ports (string_compose (".*%1", output_port_name), DataType::MIDI, PortFlags (IsPhysical|IsInput), out);
@ -1209,8 +1208,8 @@ Push2::connection_handler (boost::weak_ptr<ARDOUR::Port>, std::string name1, boo
return false; return false;
} }
string ni = ARDOUR::AudioEngine::instance()->make_port_name_non_relative (boost::shared_ptr<ARDOUR::Port>(_async_in)->name()); std::string ni = ARDOUR::AudioEngine::instance()->make_port_name_non_relative (boost::shared_ptr<ARDOUR::Port>(_async_in)->name());
string no = ARDOUR::AudioEngine::instance()->make_port_name_non_relative (boost::shared_ptr<ARDOUR::Port>(_async_out)->name()); std::string no = ARDOUR::AudioEngine::instance()->make_port_name_non_relative (boost::shared_ptr<ARDOUR::Port>(_async_out)->name());
if (ni == name1 || ni == name2) { if (ni == name1 || ni == name2) {
if (yn) { if (yn) {
@ -1312,7 +1311,7 @@ void
Push2::set_pad_scale (int root, int octave, MusicalMode::Type mode, bool inkey) Push2::set_pad_scale (int root, int octave, MusicalMode::Type mode, bool inkey)
{ {
MusicalMode m (mode); MusicalMode m (mode);
vector<float>::iterator interval; std::vector<float>::iterator interval;
int note; int note;
const int original_root = root; const int original_root = root;
@ -1322,8 +1321,8 @@ Push2::set_pad_scale (int root, int octave, MusicalMode::Type mode, bool inkey)
const int root_start = root; const int root_start = root;
set<int> mode_map; /* contains only notes in mode, O(logN) lookup */ std::set<int> mode_map; /* contains only notes in mode, O(logN) lookup */
vector<int> mode_vector; /* sorted in note order */ std::vector<int> mode_vector; /* sorted in note order */
mode_map.insert (note); mode_map.insert (note);
mode_vector.push_back (note); mode_vector.push_back (note);
@ -1356,7 +1355,7 @@ Push2::set_pad_scale (int root, int octave, MusicalMode::Type mode, bool inkey)
if (inkey) { if (inkey) {
vector<int>::iterator notei; std::vector<int>::iterator notei;
int row_offset = 0; int row_offset = 0;
for (int row = 0; row < 8; ++row) { for (int row = 0; row < 8; ++row) {

View file

@ -34,7 +34,6 @@
#endif #endif
using namespace ARDOUR; using namespace ARDOUR;
using namespace std;
using namespace PBD; using namespace PBD;
using namespace Glib; using namespace Glib;
using namespace ArdourSurface; using namespace ArdourSurface;
@ -376,7 +375,7 @@ ScaleLayout::strip_vpot (int n, int delta)
void void
ScaleLayout::build_scale_menu () ScaleLayout::build_scale_menu ()
{ {
vector<string> v; std::vector<std::string> v;
/* must match in which enums are declared in push2.h /* must match in which enums are declared in push2.h
*/ */
@ -460,8 +459,8 @@ ScaleLayout::show_root_state ()
Pango::FontDescription fd ("Sans 10"); Pango::FontDescription fd ("Sans 10");
uint32_t highlight_text = 0; uint32_t highlight_text = 0;
vector<Text*>* none_text_array = 0; std::vector<Text*>* none_text_array = 0;
vector<Text*>* one_text_array = 0; std::vector<Text*>* one_text_array = 0;
Push2::ButtonID bid = Push2::Upper2; /* keep compilers quiet */ Push2::ButtonID bid = Push2::Upper2; /* keep compilers quiet */
switch (_p2.scale_root()) { switch (_p2.scale_root()) {
@ -595,14 +594,14 @@ ScaleLayout::menu_rearranged ()
_left_scroll_text->set ("<"); _left_scroll_text->set ("<");
_close_text->hide (); _close_text->hide ();
} else { } else {
_left_scroll_text->set (string()); _left_scroll_text->set (std::string());
_close_text->show (); _close_text->show ();
} }
if (_scale_menu->can_scroll_right()) { if (_scale_menu->can_scroll_right()) {
_right_scroll_text->set (">"); _right_scroll_text->set (">");
} else { } else {
_right_scroll_text->set (string()); _right_scroll_text->set (std::string());
} }
} }

View file

@ -36,7 +36,6 @@
using namespace ARDOUR; using namespace ARDOUR;
using namespace PBD; using namespace PBD;
using namespace std;
using namespace ArdourSurface; using namespace ArdourSurface;
using namespace ArdourCanvas; using namespace ArdourCanvas;
@ -49,7 +48,7 @@ SplashLayout::SplashLayout (Push2& p, Session& s, std::string const & name)
rc.add_subdirectory_to_paths ("resources"); rc.add_subdirectory_to_paths ("resources");
if (!find_file (rc, PROGRAM_NAME "-splash.png", splash_file)) { if (!find_file (rc, PROGRAM_NAME "-splash.png", splash_file)) {
cerr << "Cannot find splash screen image file\n"; std::cerr << "Cannot find splash screen image file\n";
throw failed_constructor(); throw failed_constructor();
} }
@ -70,7 +69,7 @@ SplashLayout::render (Rect const& area, Cairo::RefPtr<Cairo::Context> context) c
double x_ratio = (double) _img->get_width() / (cols - 20); double x_ratio = (double) _img->get_width() / (cols - 20);
double y_ratio = (double) _img->get_height() / (rows - 20); double y_ratio = (double) _img->get_height() / (rows - 20);
double scale = min (x_ratio, y_ratio); double scale = std::min (x_ratio, y_ratio);
/* background */ /* background */

View file

@ -73,7 +73,6 @@
#endif #endif
using namespace ARDOUR; using namespace ARDOUR;
using namespace std;
using namespace PBD; using namespace PBD;
using namespace Glib; using namespace Glib;
using namespace ArdourSurface; using namespace ArdourSurface;