From 07d04be98d84e4d33215956aee7cabefc16cdf85 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 25 Feb 2021 15:55:10 +0100 Subject: [PATCH] Potential fix for MSVC builds The set is defined with custom compare fn: std::set x; but later iterators used a default constructor: std::set::iterator i = x.begin(); --- gtk2_ardour/recorder_ui.cc | 8 ++++---- gtk2_ardour/recorder_ui.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/recorder_ui.cc b/gtk2_ardour/recorder_ui.cc index 290206a54f..7b750f0cf7 100644 --- a/gtk2_ardour/recorder_ui.cc +++ b/gtk2_ardour/recorder_ui.cc @@ -625,11 +625,11 @@ RecorderUI::update_io_widget_labels () uint32_t n_audio = 0; uint32_t n_midi = 0; - std::set , InputPortPtrSort> ips; + InputPortSet ips; for (InputPortMap::const_iterator i = _input_ports.begin (); i != _input_ports.end (); ++i) { ips.insert (i->second); } - for (set >::const_iterator i = ips.begin (); i != ips.end (); ++i) { + for (InputPortSet::const_iterator i = ips.begin (); i != ips.end (); ++i) { boost::shared_ptr const& ip = *i; switch (ip->data_type ()) { case DataType::AUDIO: @@ -708,14 +708,14 @@ RecorderUI::meter_area_layout () int row = 0; int spc = 2; - std::set , InputPortPtrSort> ips; + InputPortSet ips; for (InputPortMap::const_iterator i = _input_ports.begin (); i != _input_ports.end (); ++i) { boost::shared_ptr const& ip = i->second; ip->show (); ips.insert (ip); } - for (set >::const_iterator i = ips.begin (); i != ips.end (); ++i) { + for (InputPortSet::const_iterator i = ips.begin (); i != ips.end (); ++i) { boost::shared_ptr const& ip = *i; _meter_table.attach (*ip, col, col + 1, row, row + 1, SHRINK|FILL, SHRINK, spc, spc); diff --git a/gtk2_ardour/recorder_ui.h b/gtk2_ardour/recorder_ui.h index 42178e1a37..e0c3ce08aa 100644 --- a/gtk2_ardour/recorder_ui.h +++ b/gtk2_ardour/recorder_ui.h @@ -243,7 +243,8 @@ private: } }; - typedef std::map > InputPortMap; + typedef std::map > InputPortMap; + typedef std::set, InputPortPtrSort> InputPortSet; RecRuler _ruler; Gtk::EventBox _space;