Reduce reliance on boost - the easy part
* boost::unordered_map -> std::unordered_map * BOOST_STATIC_ASSERT/static_assert * BOOST_FOREACH -> for * boost::tuple -> std::tuple/g * boost::math::isnormal -> std::isnormal * boost::container::set -> std::set * boost::none -> std::nullopt * boost::optional -> std::optional
This commit is contained in:
parent
168b917730
commit
ff95d81612
@ -1459,7 +1459,7 @@ ARDOUR_UI::update_disk_space()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<samplecnt_t> opt_samples = _session->available_capture_duration();
|
std::optional<samplecnt_t> opt_samples = _session->available_capture_duration();
|
||||||
samplecnt_t fr = _session->sample_rate();
|
samplecnt_t fr = _session->sample_rate();
|
||||||
|
|
||||||
if (fr == 0) {
|
if (fr == 0) {
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <boost/unordered_map.hpp>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <gtkmm/label.h>
|
#include <gtkmm/label.h>
|
||||||
#include <gtkmm/table.h>
|
#include <gtkmm/table.h>
|
||||||
@ -133,6 +133,6 @@ protected:
|
|||||||
Gtk::Label inactive_label;
|
Gtk::Label inactive_label;
|
||||||
Gtk::Table inactive_table;
|
Gtk::Table inactive_table;
|
||||||
|
|
||||||
mutable boost::unordered_map<std::string, std::string> property_hashtable;
|
mutable std::unordered_map<std::string, std::string> property_hashtable;
|
||||||
}; /* class AxisView */
|
}; /* class AxisView */
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
* Apple's MacTypes.h and BarController.
|
* Apple's MacTypes.h and BarController.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/none.hpp>
|
|
||||||
|
|
||||||
#include <sigc++/bind.h>
|
#include <sigc++/bind.h>
|
||||||
|
|
||||||
@ -1018,7 +1017,7 @@ Editor::deferred_control_scroll (samplepos_t /*target*/)
|
|||||||
{
|
{
|
||||||
_session->request_locate (*_control_scroll_target);
|
_session->request_locate (*_control_scroll_target);
|
||||||
/* reset for next stream */
|
/* reset for next stream */
|
||||||
_control_scroll_target = boost::none;
|
_control_scroll_target = std::nullopt;
|
||||||
_dragging_playhead = false;
|
_dragging_playhead = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
#include <gtkmm/comboboxtext.h>
|
#include <gtkmm/comboboxtext.h>
|
||||||
#include <gtkmm/layout.h>
|
#include <gtkmm/layout.h>
|
||||||
@ -532,7 +532,7 @@ private:
|
|||||||
bool constructed;
|
bool constructed;
|
||||||
|
|
||||||
// to keep track of the playhead position for control_scroll
|
// to keep track of the playhead position for control_scroll
|
||||||
boost::optional<samplepos_t> _control_scroll_target;
|
std::optional<samplepos_t> _control_scroll_target;
|
||||||
|
|
||||||
SelectionPropertiesBox* _properties_box;
|
SelectionPropertiesBox* _properties_box;
|
||||||
|
|
||||||
@ -580,7 +580,7 @@ private:
|
|||||||
|
|
||||||
void update_join_object_range_location (double);
|
void update_join_object_range_location (double);
|
||||||
|
|
||||||
boost::optional<float> pre_notebook_shrink_pane_width;
|
std::optional<float> pre_notebook_shrink_pane_width;
|
||||||
|
|
||||||
Gtk::VBox _editor_list_vbox;
|
Gtk::VBox _editor_list_vbox;
|
||||||
Gtk::Notebook _the_notebook;
|
Gtk::Notebook _the_notebook;
|
||||||
|
@ -152,7 +152,7 @@ bool
|
|||||||
Editor::canvas_scroll_event (GdkEventScroll *event, bool from_canvas)
|
Editor::canvas_scroll_event (GdkEventScroll *event, bool from_canvas)
|
||||||
{
|
{
|
||||||
if (from_canvas) {
|
if (from_canvas) {
|
||||||
boost::optional<ArdourCanvas::Rect> rulers = _time_markers_group->bounding_box();
|
std::optional<ArdourCanvas::Rect> rulers = _time_markers_group->bounding_box();
|
||||||
if (rulers && rulers->contains (Duple (event->x, event->y))) {
|
if (rulers && rulers->contains (Duple (event->x, event->y))) {
|
||||||
return canvas_ruler_event ((GdkEvent*) event, timecode_ruler, TimecodeRulerItem);
|
return canvas_ruler_event ((GdkEvent*) event, timecode_ruler, TimecodeRulerItem);
|
||||||
}
|
}
|
||||||
|
@ -1393,7 +1393,7 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
|
|||||||
|
|
||||||
/* How high is this region view ? */
|
/* How high is this region view ? */
|
||||||
|
|
||||||
boost::optional<ArdourCanvas::Rect> obbox = rv->get_canvas_group ()->bounding_box ();
|
std::optional<ArdourCanvas::Rect> obbox = rv->get_canvas_group ()->bounding_box ();
|
||||||
ArdourCanvas::Rect bbox;
|
ArdourCanvas::Rect bbox;
|
||||||
|
|
||||||
if (obbox) {
|
if (obbox) {
|
||||||
@ -5122,7 +5122,7 @@ FeatureLineDrag::motion (GdkEvent*, bool)
|
|||||||
cx = 0;
|
cx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<ArdourCanvas::Rect> bbox = _line->bounding_box ();
|
std::optional<ArdourCanvas::Rect> bbox = _line->bounding_box ();
|
||||||
assert (bbox);
|
assert (bbox);
|
||||||
_line->set (ArdourCanvas::Duple (cx, 2.0), ArdourCanvas::Duple (cx, bbox.value ().height ()));
|
_line->set (ArdourCanvas::Duple (cx, 2.0), ArdourCanvas::Duple (cx, bbox.value ().height ()));
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef _gtk_ardour_editor_sections_h_
|
#ifndef _gtk_ardour_editor_sections_h_
|
||||||
#define _gtk_ardour_editor_sections_h_
|
#define _gtk_ardour_editor_sections_h_
|
||||||
|
|
||||||
#include <boost/unordered_map.hpp>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "ardour/location.h"
|
#include "ardour/location.h"
|
||||||
#include "ardour/session_handle.h"
|
#include "ardour/session_handle.h"
|
||||||
@ -108,7 +108,7 @@ private:
|
|||||||
Gtk::TreeModelColumn<Temporal::timepos_t> end;
|
Gtk::TreeModelColumn<Temporal::timepos_t> end;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef boost::unordered_map<ARDOUR::Location*, Gtk::TreeModel::iterator> LocationRowMap;
|
typedef std::unordered_map<ARDOUR::Location*, Gtk::TreeModel::iterator> LocationRowMap;
|
||||||
|
|
||||||
Columns _columns;
|
Columns _columns;
|
||||||
Glib::RefPtr<Gtk::ListStore> _model;
|
Glib::RefPtr<Gtk::ListStore> _model;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __gtk2_ardour_ghost_event_h__
|
#ifndef __gtk2_ardour_ghost_event_h__
|
||||||
#define __gtk2_ardour_ghost_event_h__
|
#define __gtk2_ardour_ghost_event_h__
|
||||||
|
|
||||||
#include <boost/unordered_map.hpp>
|
#include <unordered_map>
|
||||||
#include <sigc++/trackable.h>
|
#include <sigc++/trackable.h>
|
||||||
|
|
||||||
#include "evoral/Note.h"
|
#include "evoral/Note.h"
|
||||||
@ -28,7 +28,7 @@ class GhostEvent : public sigc::trackable
|
|||||||
|
|
||||||
/* must match typedef in NoteBase */
|
/* must match typedef in NoteBase */
|
||||||
typedef Evoral::Note<Temporal::Beats> NoteType;
|
typedef Evoral::Note<Temporal::Beats> NoteType;
|
||||||
typedef boost::unordered_map<std::shared_ptr<NoteType>, GhostEvent* > EventList;
|
typedef std::unordered_map<std::shared_ptr<NoteType>, GhostEvent* > EventList;
|
||||||
|
|
||||||
static GhostEvent* find (std::shared_ptr<NoteType> parent, EventList& events, EventList::iterator& opti);
|
static GhostEvent* find (std::shared_ptr<NoteType> parent, EventList& events, EventList::iterator& opti);
|
||||||
};
|
};
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <boost/unordered_map.hpp>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <sigc++/signal.h>
|
#include <sigc++/signal.h>
|
||||||
|
|
||||||
@ -478,9 +478,9 @@ class MidiView : public virtual sigc::trackable, public LineMerger
|
|||||||
uint8_t get_velocity_for_add (ARDOUR::MidiModel::TimeType time) const;
|
uint8_t get_velocity_for_add (ARDOUR::MidiModel::TimeType time) const;
|
||||||
uint8_t get_channel_for_add (ARDOUR::MidiModel::TimeType time) const;
|
uint8_t get_channel_for_add (ARDOUR::MidiModel::TimeType time) const;
|
||||||
|
|
||||||
typedef boost::unordered_map<std::shared_ptr<NoteType>, NoteBase*> Events;
|
typedef std::unordered_map<std::shared_ptr<NoteType>, NoteBase*> Events;
|
||||||
typedef boost::unordered_map<ARDOUR::MidiModel::PatchChangePtr, std::shared_ptr<PatchChange> > PatchChanges;
|
typedef std::unordered_map<ARDOUR::MidiModel::PatchChangePtr, std::shared_ptr<PatchChange> > PatchChanges;
|
||||||
typedef boost::unordered_map<ARDOUR::MidiModel::constSysExPtr, std::shared_ptr<SysEx> > SysExes;
|
typedef std::unordered_map<ARDOUR::MidiModel::constSysExPtr, std::shared_ptr<SysEx> > SysExes;
|
||||||
typedef std::vector<NoteBase*> CopyDragEvents;
|
typedef std::vector<NoteBase*> CopyDragEvents;
|
||||||
|
|
||||||
std::shared_ptr<ARDOUR::MidiTrack> _midi_track;
|
std::shared_ptr<ARDOUR::MidiTrack> _midi_track;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
|
||||||
|
|
||||||
#include "gtkmm2ext/utils.h"
|
#include "gtkmm2ext/utils.h"
|
||||||
|
|
||||||
@ -197,7 +196,7 @@ RouteList
|
|||||||
MixerGroupTabs::selected_routes () const
|
MixerGroupTabs::selected_routes () const
|
||||||
{
|
{
|
||||||
RouteList rl;
|
RouteList rl;
|
||||||
BOOST_FOREACH (AxisView* r, _mixer->selection().axes) {
|
for (AxisView* r : _mixer->selection().axes) {
|
||||||
std::shared_ptr<Route> rp = std::dynamic_pointer_cast<Route> (r->stripable());
|
std::shared_ptr<Route> rp = std::dynamic_pointer_cast<Route> (r->stripable());
|
||||||
if (rp) {
|
if (rp) {
|
||||||
rl.push_back (rp);
|
rl.push_back (rp);
|
||||||
|
@ -1838,24 +1838,24 @@ MixerStrip::parameter_changed (string p)
|
|||||||
*
|
*
|
||||||
* @return optional value that is present if visibility state should be overridden.
|
* @return optional value that is present if visibility state should be overridden.
|
||||||
*/
|
*/
|
||||||
boost::optional<bool>
|
std::optional<bool>
|
||||||
MixerStrip::override_solo_visibility () const
|
MixerStrip::override_solo_visibility () const
|
||||||
{
|
{
|
||||||
if (is_master ()) {
|
if (is_master ()) {
|
||||||
return boost::optional<bool> (false);
|
return std::optional<bool> (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return boost::optional<bool> ();
|
return std::optional<bool> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<bool>
|
std::optional<bool>
|
||||||
MixerStrip::override_rec_mon_visibility () const
|
MixerStrip::override_rec_mon_visibility () const
|
||||||
{
|
{
|
||||||
if (is_master ()) {
|
if (is_master ()) {
|
||||||
return boost::optional<bool> (false);
|
return std::optional<bool> (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return boost::optional<bool> ();
|
return std::optional<bool> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -311,8 +311,8 @@ private:
|
|||||||
* the RC option editor.
|
* the RC option editor.
|
||||||
*/
|
*/
|
||||||
VisibilityGroup _visibility;
|
VisibilityGroup _visibility;
|
||||||
boost::optional<bool> override_solo_visibility () const;
|
std::optional<bool> override_solo_visibility () const;
|
||||||
boost::optional<bool> override_rec_mon_visibility () const;
|
std::optional<bool> override_rec_mon_visibility () const;
|
||||||
|
|
||||||
PBD::ScopedConnectionList _config_connection;
|
PBD::ScopedConnectionList _config_connection;
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <sigc++/bind.h>
|
#include <sigc++/bind.h>
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
|
||||||
|
|
||||||
#include <glibmm/threads.h>
|
#include <glibmm/threads.h>
|
||||||
|
|
||||||
@ -3775,7 +3774,7 @@ Mixer_UI::control_action (std::shared_ptr<T> (Stripable::*get_control)() const)
|
|||||||
|
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
|
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
std::shared_ptr<Stripable> s = r->stripable();
|
std::shared_ptr<Stripable> s = r->stripable();
|
||||||
if (s) {
|
if (s) {
|
||||||
ac = (s.get()->*get_control)();
|
ac = (s.get()->*get_control)();
|
||||||
@ -3816,7 +3815,7 @@ Mixer_UI::selected_gaincontrols ()
|
|||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
ControllableSet rv;
|
ControllableSet rv;
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
std::shared_ptr<GainControl> ac (ms->route()->gain_control());
|
std::shared_ptr<GainControl> ac (ms->route()->gain_control());
|
||||||
@ -3857,7 +3856,7 @@ Mixer_UI::unity_gain_action ()
|
|||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
|
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
std::shared_ptr<Stripable> s = r->stripable();
|
std::shared_ptr<Stripable> s = r->stripable();
|
||||||
if (s) {
|
if (s) {
|
||||||
std::shared_ptr<AutomationControl> ac = s->gain_control();
|
std::shared_ptr<AutomationControl> ac = s->gain_control();
|
||||||
@ -3873,7 +3872,7 @@ Mixer_UI::copy_processors ()
|
|||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
|
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
ms->copy_processors ();
|
ms->copy_processors ();
|
||||||
@ -3885,7 +3884,7 @@ Mixer_UI::cut_processors ()
|
|||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
|
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
ms->cut_processors ();
|
ms->cut_processors ();
|
||||||
@ -3897,7 +3896,7 @@ Mixer_UI::paste_processors ()
|
|||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
|
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
ms->paste_processors ();
|
ms->paste_processors ();
|
||||||
@ -3909,7 +3908,7 @@ Mixer_UI::select_all_processors ()
|
|||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
|
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
ms->select_all_processors ();
|
ms->select_all_processors ();
|
||||||
@ -3921,7 +3920,7 @@ Mixer_UI::toggle_processors ()
|
|||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
|
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
ms->toggle_processors ();
|
ms->toggle_processors ();
|
||||||
@ -3933,7 +3932,7 @@ Mixer_UI::ab_plugins ()
|
|||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
|
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
ms->ab_plugins ();
|
ms->ab_plugins ();
|
||||||
@ -3945,7 +3944,7 @@ void
|
|||||||
Mixer_UI::vca_assign (std::shared_ptr<VCA> vca)
|
Mixer_UI::vca_assign (std::shared_ptr<VCA> vca)
|
||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
ms->vca_assign (vca);
|
ms->vca_assign (vca);
|
||||||
@ -3957,7 +3956,7 @@ void
|
|||||||
Mixer_UI::vca_unassign (std::shared_ptr<VCA> vca)
|
Mixer_UI::vca_unassign (std::shared_ptr<VCA> vca)
|
||||||
{
|
{
|
||||||
set_axis_targets_for_operation ();
|
set_axis_targets_for_operation ();
|
||||||
BOOST_FOREACH(AxisView* r, _axis_targets) {
|
for (AxisView* r : _axis_targets) {
|
||||||
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
|
||||||
if (ms) {
|
if (ms) {
|
||||||
ms->vca_unassign (vca);
|
ms->vca_unassign (vca);
|
||||||
|
@ -252,7 +252,7 @@ NoteBase::set_mouse_fractions (GdkEvent* ev)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<ArdourCanvas::Rect> bbox = _item->bounding_box ();
|
std::optional<ArdourCanvas::Rect> bbox = _item->bounding_box ();
|
||||||
assert (bbox);
|
assert (bbox);
|
||||||
|
|
||||||
_item->canvas_to_item (ix, iy);
|
_item->canvas_to_item (ix, iy);
|
||||||
|
@ -318,7 +318,7 @@ RemainInfoBox::render (Cairo::RefPtr<Cairo::Context> const& cr, cairo_rectangle_
|
|||||||
}
|
}
|
||||||
|
|
||||||
samplecnt_t sample_rate = _session->nominal_sample_rate ();
|
samplecnt_t sample_rate = _session->nominal_sample_rate ();
|
||||||
boost::optional<samplecnt_t> opt_samples = _session->available_capture_duration ();
|
std::optional<samplecnt_t> opt_samples = _session->available_capture_duration ();
|
||||||
|
|
||||||
Gtkmm2ext::set_source_rgb_a (cr, UIConfiguration::instance ().color ("widget:bg"), .7);
|
Gtkmm2ext::set_source_rgb_a (cr, UIConfiguration::instance ().color ("widget:bg"), .7);
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#ifndef _gtk_ardour_region_list_base_h_
|
#ifndef _gtk_ardour_region_list_base_h_
|
||||||
#define _gtk_ardour_region_list_base_h_
|
#define _gtk_ardour_region_list_base_h_
|
||||||
|
|
||||||
#include <boost/unordered_map.hpp>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <gtkmm/celleditable.h>
|
#include <gtkmm/celleditable.h>
|
||||||
#include <gtkmm/frame.h>
|
#include <gtkmm/frame.h>
|
||||||
@ -236,7 +236,7 @@ protected:
|
|||||||
|
|
||||||
bool _no_redisplay;
|
bool _no_redisplay;
|
||||||
|
|
||||||
typedef boost::unordered_map<std::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::iterator> RegionRowMap;
|
typedef std::unordered_map<std::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::iterator> RegionRowMap;
|
||||||
|
|
||||||
RegionRowMap region_row_map;
|
RegionRowMap region_row_map;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ VisibilityGroup::VisibilityGroup (std::string const & name)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
VisibilityGroup::add (Gtk::Widget* widget, string const & id, string const & name, bool visible, boost::function<boost::optional<bool> ()> override)
|
VisibilityGroup::add (Gtk::Widget* widget, string const & id, string const & name, bool visible, boost::function<std::optional<bool> ()> override)
|
||||||
{
|
{
|
||||||
Member m;
|
Member m;
|
||||||
m.widget = widget;
|
m.widget = widget;
|
||||||
@ -92,7 +92,7 @@ bool
|
|||||||
VisibilityGroup::should_actually_be_visible (Member const & m) const
|
VisibilityGroup::should_actually_be_visible (Member const & m) const
|
||||||
{
|
{
|
||||||
if (m.override) {
|
if (m.override) {
|
||||||
boost::optional<bool> o = m.override ();
|
std::optional<bool> o = m.override ();
|
||||||
if (o) {
|
if (o) {
|
||||||
return o.value ();
|
return o.value ();
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
std::string const &,
|
std::string const &,
|
||||||
std::string const &,
|
std::string const &,
|
||||||
bool visible = false,
|
bool visible = false,
|
||||||
boost::function<boost::optional<bool> ()> = 0
|
boost::function<std::optional<bool> ()> = 0
|
||||||
);
|
);
|
||||||
|
|
||||||
Gtk::Widget* list_view ();
|
Gtk::Widget* list_view ();
|
||||||
@ -64,7 +64,7 @@ private:
|
|||||||
std::string id;
|
std::string id;
|
||||||
std::string name;
|
std::string name;
|
||||||
bool visible;
|
bool visible;
|
||||||
boost::function<boost::optional<bool> ()> override;
|
boost::function<std::optional<bool> ()> override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModelColumns : public Gtk::TreeModelColumnRecord {
|
class ModelColumns : public Gtk::TreeModelColumnRecord {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
#include "evoral/Curve.h"
|
#include "evoral/Curve.h"
|
||||||
|
|
||||||
@ -210,8 +210,8 @@ private:
|
|||||||
sampleoffset_t _declick_offs;
|
sampleoffset_t _declick_offs;
|
||||||
bool _declick_enabled;
|
bool _declick_enabled;
|
||||||
MidiNoteTracker _tracker;
|
MidiNoteTracker _tracker;
|
||||||
boost::optional<bool> _last_read_reversed;
|
std::optional<bool> _last_read_reversed;
|
||||||
boost::optional<bool> _last_read_loop;
|
std::optional<bool> _last_read_loop;
|
||||||
|
|
||||||
static samplecnt_t _chunk_samples;
|
static samplecnt_t _chunk_samples;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
#include "ardour/disk_io.h"
|
#include "ardour/disk_io.h"
|
||||||
#include "ardour/event_ring_buffer.h"
|
#include "ardour/event_ring_buffer.h"
|
||||||
@ -171,7 +171,7 @@ private:
|
|||||||
|
|
||||||
samplepos_t get_capture_start_sample_locked (uint32_t n = 0) const;
|
samplepos_t get_capture_start_sample_locked (uint32_t n = 0) const;
|
||||||
|
|
||||||
boost::optional<samplepos_t> _capture_start_sample;
|
std::optional<samplepos_t> _capture_start_sample;
|
||||||
|
|
||||||
samplecnt_t _capture_captured;
|
samplecnt_t _capture_captured;
|
||||||
bool _was_recording;
|
bool _was_recording;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@ -471,7 +471,7 @@ private:
|
|||||||
void coalesce_and_check_crossfades (std::list<Temporal::TimeRange>);
|
void coalesce_and_check_crossfades (std::list<Temporal::TimeRange>);
|
||||||
std::shared_ptr<RegionList> find_regions_at (timepos_t const &);
|
std::shared_ptr<RegionList> find_regions_at (timepos_t const &);
|
||||||
|
|
||||||
mutable boost::optional<std::pair<timepos_t, timepos_t> > _cached_extent;
|
mutable std::optional<std::pair<timepos_t, timepos_t> > _cached_extent;
|
||||||
timepos_t _end_space; //this is used when we are pasting a range with extra space at the end
|
timepos_t _end_space; //this is used when we are pasting a range with extra space at the end
|
||||||
bool _playlist_shift_active;
|
bool _playlist_shift_active;
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <boost/container/set.hpp>
|
|
||||||
|
|
||||||
#include "ardour/libardour_visibility.h"
|
#include "ardour/libardour_visibility.h"
|
||||||
#include "ardour/types.h"
|
#include "ardour/types.h"
|
||||||
@ -193,7 +192,7 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef boost::container::set<PSLEPtr, PSLEPtrSort> PluginScanLog;
|
typedef std::set<PSLEPtr, PSLEPtrSort> PluginScanLog;
|
||||||
PluginScanLog _plugin_scan_log;
|
PluginScanLog _plugin_scan_log;
|
||||||
|
|
||||||
PSLEPtr scan_log_entry (PluginType const type, std::string const& path) {
|
PSLEPtr scan_log_entry (PluginType const type, std::string const& path) {
|
||||||
|
@ -768,7 +768,7 @@ public:
|
|||||||
samplepos_t audible_sample (bool* latent_locate = NULL) const;
|
samplepos_t audible_sample (bool* latent_locate = NULL) const;
|
||||||
samplepos_t requested_return_sample() const { return _requested_return_sample; }
|
samplepos_t requested_return_sample() const { return _requested_return_sample; }
|
||||||
void set_requested_return_sample(samplepos_t return_to);
|
void set_requested_return_sample(samplepos_t return_to);
|
||||||
boost::optional<samplepos_t> const & nominal_jack_transport_sample() { return _nominal_jack_transport_sample; }
|
std::optional<samplepos_t> const & nominal_jack_transport_sample() { return _nominal_jack_transport_sample; }
|
||||||
|
|
||||||
bool compute_audible_delta (samplepos_t& pos_and_delta) const;
|
bool compute_audible_delta (samplepos_t& pos_and_delta) const;
|
||||||
samplecnt_t remaining_latency_preroll () const { return _remaining_latency_preroll; }
|
samplecnt_t remaining_latency_preroll () const { return _remaining_latency_preroll; }
|
||||||
@ -1051,7 +1051,7 @@ public:
|
|||||||
|
|
||||||
/* s/w "RAID" management */
|
/* s/w "RAID" management */
|
||||||
|
|
||||||
boost::optional<samplecnt_t> available_capture_duration();
|
std::optional<samplecnt_t> available_capture_duration();
|
||||||
|
|
||||||
/* I/O bundles */
|
/* I/O bundles */
|
||||||
|
|
||||||
@ -1435,8 +1435,8 @@ private:
|
|||||||
void add_surround_master ();
|
void add_surround_master ();
|
||||||
void remove_surround_master ();
|
void remove_surround_master ();
|
||||||
|
|
||||||
boost::optional<bool> _vapor_available;
|
std::optional<bool> _vapor_available;
|
||||||
boost::optional<bool> _vapor_exportable;
|
std::optional<bool> _vapor_exportable;
|
||||||
|
|
||||||
void update_latency (bool playback);
|
void update_latency (bool playback);
|
||||||
void set_owned_port_public_latency (bool playback);
|
void set_owned_port_public_latency (bool playback);
|
||||||
@ -2317,7 +2317,7 @@ private:
|
|||||||
CoreSelection* _selection;
|
CoreSelection* _selection;
|
||||||
|
|
||||||
bool _global_locate_pending;
|
bool _global_locate_pending;
|
||||||
boost::optional<samplepos_t> _nominal_jack_transport_sample;
|
std::optional<samplepos_t> _nominal_jack_transport_sample;
|
||||||
|
|
||||||
bool _had_destructive_tracks;
|
bool _had_destructive_tracks;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "pbd/enum_convert.h"
|
#include "pbd/enum_convert.h"
|
||||||
@ -196,7 +196,7 @@ protected:
|
|||||||
void update_input_meter ();
|
void update_input_meter ();
|
||||||
|
|
||||||
std::shared_ptr<Playlist> _playlists[DataType::num_types];
|
std::shared_ptr<Playlist> _playlists[DataType::num_types];
|
||||||
boost::optional<MeterPoint> _saved_meter_point;
|
std::optional<MeterPoint> _saved_meter_point;
|
||||||
bool _record_prepared;
|
bool _record_prepared;
|
||||||
TrackMode _mode;
|
TrackMode _mode;
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
#include <boost/intrusive/list.hpp>
|
#include <boost/intrusive/list.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
@ -208,7 +208,7 @@ struct TransportFSM
|
|||||||
EventList queued_events;
|
EventList queued_events;
|
||||||
EventList deferred_events;
|
EventList deferred_events;
|
||||||
int processing;
|
int processing;
|
||||||
mutable boost::optional<bool> current_roll_after_locate_status;
|
mutable std::optional<bool> current_roll_after_locate_status;
|
||||||
mutable double most_recently_requested_speed;
|
mutable double most_recently_requested_speed;
|
||||||
mutable double _default_speed;
|
mutable double _default_speed;
|
||||||
int _reverse_after_declick;
|
int _reverse_after_declick;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
#include <glibmm/threads.h>
|
#include <glibmm/threads.h>
|
||||||
#include <glibmm/timer.h>
|
#include <glibmm/timer.h>
|
||||||
@ -152,7 +152,7 @@ public:
|
|||||||
static std::shared_ptr<TransportMaster> factory (SyncSource, std::string const&, bool removeable);
|
static std::shared_ptr<TransportMaster> factory (SyncSource, std::string const&, bool removeable);
|
||||||
static std::shared_ptr<TransportMaster> factory (XMLNode const&);
|
static std::shared_ptr<TransportMaster> factory (XMLNode const&);
|
||||||
|
|
||||||
virtual void pre_process (pframes_t nframes, samplepos_t now, boost::optional<samplepos_t>) = 0;
|
virtual void pre_process (pframes_t nframes, samplepos_t now, std::optional<samplepos_t>) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the most important function to implement:
|
* This is the most important function to implement:
|
||||||
@ -513,7 +513,7 @@ public:
|
|||||||
|
|
||||||
void set_session (Session*);
|
void set_session (Session*);
|
||||||
|
|
||||||
void pre_process (pframes_t nframes, samplepos_t now, boost::optional<samplepos_t>);
|
void pre_process (pframes_t nframes, samplepos_t now, std::optional<samplepos_t>);
|
||||||
|
|
||||||
void unregister_port ();
|
void unregister_port ();
|
||||||
|
|
||||||
@ -585,7 +585,7 @@ public:
|
|||||||
|
|
||||||
void set_session (Session*);
|
void set_session (Session*);
|
||||||
|
|
||||||
void pre_process (pframes_t nframes, samplepos_t now, boost::optional<samplepos_t>);
|
void pre_process (pframes_t nframes, samplepos_t now, std::optional<samplepos_t>);
|
||||||
|
|
||||||
void reset (bool with_pos);
|
void reset (bool with_pos);
|
||||||
bool locked () const;
|
bool locked () const;
|
||||||
@ -666,7 +666,7 @@ public:
|
|||||||
|
|
||||||
void unregister_port ();
|
void unregister_port ();
|
||||||
|
|
||||||
void pre_process (pframes_t nframes, samplepos_t now, boost::optional<samplepos_t>);
|
void pre_process (pframes_t nframes, samplepos_t now, std::optional<samplepos_t>);
|
||||||
|
|
||||||
void rebind (MidiPort&);
|
void rebind (MidiPort&);
|
||||||
|
|
||||||
@ -737,7 +737,7 @@ public:
|
|||||||
Engine_TransportMaster (AudioEngine&);
|
Engine_TransportMaster (AudioEngine&);
|
||||||
~Engine_TransportMaster ();
|
~Engine_TransportMaster ();
|
||||||
|
|
||||||
void pre_process (pframes_t nframes, samplepos_t now, boost::optional<samplepos_t>);
|
void pre_process (pframes_t nframes, samplepos_t now, std::optional<samplepos_t>);
|
||||||
bool speed_and_position (double& speed, samplepos_t& pos, samplepos_t&, samplepos_t&, samplepos_t);
|
bool speed_and_position (double& speed, samplepos_t& pos, samplepos_t&, samplepos_t&, samplepos_t);
|
||||||
|
|
||||||
bool starting () const
|
bool starting () const
|
||||||
|
@ -117,7 +117,7 @@ class LIBARDOUR_API TransportMasterManager
|
|||||||
static TransportMasterManager* _instance;
|
static TransportMasterManager* _instance;
|
||||||
|
|
||||||
/* original TC format in case the slave changed it */
|
/* original TC format in case the slave changed it */
|
||||||
boost::optional<Timecode::TimecodeFormat> _session_tc_format;
|
std::optional<Timecode::TimecodeFormat> _session_tc_format;
|
||||||
void maybe_restore_tc_format ();
|
void maybe_restore_tc_format ();
|
||||||
void maybe_set_tc_format ();
|
void maybe_set_tc_format ();
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
#include <glibmm/threads.h>
|
#include <glibmm/threads.h>
|
||||||
|
|
||||||
#include "pbd/search_path.h"
|
#include "pbd/search_path.h"
|
||||||
@ -328,8 +328,8 @@ private:
|
|||||||
std::set<Evoral::Parameter> _ac_subscriptions;
|
std::set<Evoral::Parameter> _ac_subscriptions;
|
||||||
bool _add_to_selection;
|
bool _add_to_selection;
|
||||||
|
|
||||||
boost::optional<uint32_t> _plugin_latency;
|
std::optional<uint32_t> _plugin_latency;
|
||||||
boost::optional<uint32_t> _plugin_tail;
|
std::optional<uint32_t> _plugin_tail;
|
||||||
|
|
||||||
int _n_bus_in;
|
int _n_bus_in;
|
||||||
int _n_bus_out;
|
int _n_bus_out;
|
||||||
@ -486,7 +486,7 @@ public:
|
|||||||
bool is_instrument () const;
|
bool is_instrument () const;
|
||||||
PBD::Searchpath preset_search_path () const;
|
PBD::Searchpath preset_search_path () const;
|
||||||
|
|
||||||
boost::optional<bool> has_editor;
|
std::optional<bool> has_editor;
|
||||||
|
|
||||||
std::shared_ptr<VST3PluginModule> m;
|
std::shared_ptr<VST3PluginModule> m;
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/math/special_functions/fpclassify.hpp>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@ -135,7 +134,7 @@ LowPass::proc (float* data, const uint32_t n_samples)
|
|||||||
_z = z;
|
_z = z;
|
||||||
if (!isfinite_local (_z)) {
|
if (!isfinite_local (_z)) {
|
||||||
_z = 0;
|
_z = 0;
|
||||||
} else if (!boost::math::isnormal (_z)) {
|
} else if (!std::isnormal (_z)) {
|
||||||
_z = 0;
|
_z = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -192,12 +191,12 @@ Biquad::run (float* data, const uint32_t n_samples)
|
|||||||
|
|
||||||
if (!isfinite_local (_z1)) {
|
if (!isfinite_local (_z1)) {
|
||||||
_z1 = 0;
|
_z1 = 0;
|
||||||
} else if (!boost::math::isnormal (_z1)) {
|
} else if (!std::isnormal (_z1)) {
|
||||||
_z1 = 0;
|
_z1 = 0;
|
||||||
}
|
}
|
||||||
if (!isfinite_local (_z2)) {
|
if (!isfinite_local (_z2)) {
|
||||||
_z2 = 0;
|
_z2 = 0;
|
||||||
} else if (!boost::math::isnormal (_z2)) {
|
} else if (!std::isnormal (_z2)) {
|
||||||
_z2 = 0;
|
_z2 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ Engine_TransportMaster::ok() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Engine_TransportMaster::pre_process (pframes_t, samplepos_t, boost::optional<samplepos_t>)
|
Engine_TransportMaster::pre_process (pframes_t, samplepos_t, std::optional<samplepos_t>)
|
||||||
{
|
{
|
||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ IO::remove_port (std::shared_ptr<Port> port, void* src)
|
|||||||
ChanCount after = before;
|
ChanCount after = before;
|
||||||
after.set (port->type(), after.get (port->type()) - 1);
|
after.set (port->type(), after.get (port->type()) - 1);
|
||||||
|
|
||||||
boost::optional<bool> const r = PortCountChanging (after); /* EMIT SIGNAL */
|
std::optional<bool> const r = PortCountChanging (after); /* EMIT SIGNAL */
|
||||||
if (r.value_or (false)) {
|
if (r.value_or (false)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ IO::add_port (string destination, void* src, DataType type)
|
|||||||
ChanCount after = before;
|
ChanCount after = before;
|
||||||
after.set (type, after.get (type) + 1);
|
after.set (type, after.get (type) + 1);
|
||||||
|
|
||||||
boost::optional<bool> const r = PortCountChanging (after); /* EMIT SIGNAL */
|
std::optional<bool> const r = PortCountChanging (after); /* EMIT SIGNAL */
|
||||||
if (r.value_or (false)) {
|
if (r.value_or (false)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -564,7 +564,7 @@ LTC_TransportMaster::process_ltc(samplepos_t const now)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LTC_TransportMaster::pre_process (ARDOUR::pframes_t nframes, samplepos_t now, boost::optional<samplepos_t> session_pos)
|
LTC_TransportMaster::pre_process (ARDOUR::pframes_t nframes, samplepos_t now, std::optional<samplepos_t> session_pos)
|
||||||
{
|
{
|
||||||
if (!_port) {
|
if (!_port) {
|
||||||
reset (true);
|
reset (true);
|
||||||
|
@ -115,7 +115,7 @@ MIDIClock_TransportMaster::set_session (Session* s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MIDIClock_TransportMaster::pre_process (MIDI::pframes_t nframes, samplepos_t now, boost::optional<samplepos_t> session_pos)
|
MIDIClock_TransportMaster::pre_process (MIDI::pframes_t nframes, samplepos_t now, std::optional<samplepos_t> session_pos)
|
||||||
{
|
{
|
||||||
/* Read and parse incoming MIDI */
|
/* Read and parse incoming MIDI */
|
||||||
if (!_midi_port) {
|
if (!_midi_port) {
|
||||||
|
@ -125,7 +125,7 @@ MTC_TransportMaster::set_session (Session* s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MTC_TransportMaster::pre_process (MIDI::pframes_t nframes, samplepos_t now, boost::optional<samplepos_t> session_pos)
|
MTC_TransportMaster::pre_process (MIDI::pframes_t nframes, samplepos_t now, std::optional<samplepos_t> session_pos)
|
||||||
{
|
{
|
||||||
/* Read and parse incoming MIDI */
|
/* Read and parse incoming MIDI */
|
||||||
|
|
||||||
|
@ -1128,7 +1128,7 @@ Route::add_processors (const ProcessorList& others, std::shared_ptr<Processor> b
|
|||||||
flags &= mask;
|
flags &= mask;
|
||||||
|
|
||||||
if (flags != None) {
|
if (flags != None) {
|
||||||
boost::optional<int> rv = PluginSetup (std::dynamic_pointer_cast<Route>(shared_from_this ()), pi, flags); /* EMIT SIGNAL */
|
std::optional<int> rv = PluginSetup (std::dynamic_pointer_cast<Route>(shared_from_this ()), pi, flags); /* EMIT SIGNAL */
|
||||||
int mode = rv.value_or (0);
|
int mode = rv.value_or (0);
|
||||||
switch (mode & 3) {
|
switch (mode & 3) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -5815,13 +5815,13 @@ Session::graph_reordered (bool called_from_backend)
|
|||||||
/** @return Number of samples that there is disk space available to write,
|
/** @return Number of samples that there is disk space available to write,
|
||||||
* if known.
|
* if known.
|
||||||
*/
|
*/
|
||||||
boost::optional<samplecnt_t>
|
std::optional<samplecnt_t>
|
||||||
Session::available_capture_duration ()
|
Session::available_capture_duration ()
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock lm (space_lock);
|
Glib::Threads::Mutex::Lock lm (space_lock);
|
||||||
|
|
||||||
if (_total_free_4k_blocks_uncertain) {
|
if (_total_free_4k_blocks_uncertain) {
|
||||||
return boost::optional<samplecnt_t> ();
|
return std::optional<samplecnt_t> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
float sample_bytes_on_disk = 4.0; // keep gcc happy
|
float sample_bytes_on_disk = 4.0; // keep gcc happy
|
||||||
|
@ -978,7 +978,7 @@ Session::load_state (string snapshot_name, bool from_template)
|
|||||||
|
|
||||||
/* there is pending state from a crashed capture attempt */
|
/* there is pending state from a crashed capture attempt */
|
||||||
|
|
||||||
boost::optional<int> r = AskAboutPendingState();
|
std::optional<int> r = AskAboutPendingState();
|
||||||
if (r.value_or (1)) {
|
if (r.value_or (1)) {
|
||||||
state_was_pending = true;
|
state_was_pending = true;
|
||||||
} else {
|
} else {
|
||||||
@ -1717,7 +1717,7 @@ Session::set_state (const XMLNode& node, int version)
|
|||||||
bool reconfigured = false;
|
bool reconfigured = false;
|
||||||
|
|
||||||
while (!AudioEngine::instance()->running () || _base_sample_rate != AudioEngine::instance()->sample_rate ()) {
|
while (!AudioEngine::instance()->running () || _base_sample_rate != AudioEngine::instance()->sample_rate ()) {
|
||||||
boost::optional<int> r = AskAboutSampleRateMismatch (_base_sample_rate, _current_sample_rate);
|
std::optional<int> r = AskAboutSampleRateMismatch (_base_sample_rate, _current_sample_rate);
|
||||||
int rv = r.value_or (0);
|
int rv = r.value_or (0);
|
||||||
if (rv == 0 && AudioEngine::instance()->running ()) {
|
if (rv == 0 && AudioEngine::instance()->running ()) {
|
||||||
/* continue with rate mismatch */
|
/* continue with rate mismatch */
|
||||||
@ -3482,7 +3482,7 @@ struct RegionCounter {
|
|||||||
int
|
int
|
||||||
Session::ask_about_playlist_deletion (std::shared_ptr<Playlist> p)
|
Session::ask_about_playlist_deletion (std::shared_ptr<Playlist> p)
|
||||||
{
|
{
|
||||||
boost::optional<int> r = AskAboutPlaylistDeletion (p);
|
std::optional<int> r = AskAboutPlaylistDeletion (p);
|
||||||
return r.value_or (1);
|
return r.value_or (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5296,7 +5296,7 @@ Session::save_as (SaveAs& saveas)
|
|||||||
|
|
||||||
/* tell someone "X percent, file M of N"; M is one-based */
|
/* tell someone "X percent, file M of N"; M is one-based */
|
||||||
|
|
||||||
boost::optional<bool> res = saveas.Progress (fraction, cnt, all);
|
std::optional<bool> res = saveas.Progress (fraction, cnt, all);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
keep_going = *res;
|
keep_going = *res;
|
||||||
|
@ -190,7 +190,7 @@ Session::locate (samplepos_t target_sample, bool for_loop_end, bool force, bool
|
|||||||
|
|
||||||
// Update Timecode time
|
// Update Timecode time
|
||||||
_transport_sample = target_sample;
|
_transport_sample = target_sample;
|
||||||
_nominal_jack_transport_sample = boost::none;
|
_nominal_jack_transport_sample = std::nullopt;
|
||||||
|
|
||||||
/* Note that loop wrap-around locates do not need to call "seek" */
|
/* Note that loop wrap-around locates do not need to call "seek" */
|
||||||
if (force || !for_loop_end) {
|
if (force || !for_loop_end) {
|
||||||
|
@ -87,7 +87,7 @@ bool
|
|||||||
TempoMapImporter::_prepare_move ()
|
TempoMapImporter::_prepare_move ()
|
||||||
{
|
{
|
||||||
// Prompt user for verification
|
// Prompt user for verification
|
||||||
boost::optional<bool> replace = Prompt (_("This will replace the current tempo map!\nAre you sure you want to do this?"));
|
std::optional<bool> replace = Prompt (_("This will replace the current tempo map!\nAre you sure you want to do this?"));
|
||||||
return replace.value_or (false);
|
return replace.value_or (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <boost/none.hpp>
|
|
||||||
|
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
#include "pbd/pthread_utils.h"
|
#include "pbd/pthread_utils.h"
|
||||||
@ -104,7 +103,7 @@ TransportFSM::hard_stop ()
|
|||||||
{
|
{
|
||||||
_motion_state = Stopped;
|
_motion_state = Stopped;
|
||||||
_last_locate.target = max_samplepos;
|
_last_locate.target = max_samplepos;
|
||||||
current_roll_after_locate_status = boost::none;
|
current_roll_after_locate_status = std::nullopt;
|
||||||
_direction_state = Forwards;
|
_direction_state = Forwards;
|
||||||
_transport_speed = 0;
|
_transport_speed = 0;
|
||||||
_reverse_after_declick = 0;
|
_reverse_after_declick = 0;
|
||||||
@ -484,7 +483,7 @@ TransportFSM::start_playback ()
|
|||||||
DEBUG_TRACE (DEBUG::TFSMEvents, "start_playback\n");
|
DEBUG_TRACE (DEBUG::TFSMEvents, "start_playback\n");
|
||||||
|
|
||||||
_last_locate.target = max_samplepos;
|
_last_locate.target = max_samplepos;
|
||||||
current_roll_after_locate_status = boost::none;
|
current_roll_after_locate_status = std::nullopt;
|
||||||
|
|
||||||
if (most_recently_requested_speed == std::numeric_limits<double>::max()) {
|
if (most_recently_requested_speed == std::numeric_limits<double>::max()) {
|
||||||
/* we started rolling without ever setting speed; that's an implicit
|
/* we started rolling without ever setting speed; that's an implicit
|
||||||
@ -504,7 +503,7 @@ TransportFSM::stop_playback (Event const & s)
|
|||||||
DEBUG_TRACE (DEBUG::TFSMEvents, "stop_playback\n");
|
DEBUG_TRACE (DEBUG::TFSMEvents, "stop_playback\n");
|
||||||
|
|
||||||
_last_locate.target = max_samplepos;
|
_last_locate.target = max_samplepos;
|
||||||
current_roll_after_locate_status = boost::none;
|
current_roll_after_locate_status = std::nullopt;
|
||||||
|
|
||||||
api->stop_transport (s.abort_capture, s.clear_state);
|
api->stop_transport (s.abort_capture, s.clear_state);
|
||||||
}
|
}
|
||||||
@ -684,7 +683,7 @@ bool
|
|||||||
TransportFSM::should_roll_after_locate () const
|
TransportFSM::should_roll_after_locate () const
|
||||||
{
|
{
|
||||||
bool roll = current_roll_after_locate_status.value_or (api->should_roll_after_locate ());
|
bool roll = current_roll_after_locate_status.value_or (api->should_roll_after_locate ());
|
||||||
current_roll_after_locate_status = boost::none; // used it
|
current_roll_after_locate_status = std::nullopt; // used it
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::TFSMEvents, string_compose ("should_roll_after_locate() ? %1\n", roll));
|
DEBUG_TRACE (DEBUG::TFSMEvents, string_compose ("should_roll_after_locate() ? %1\n", roll));
|
||||||
return roll;
|
return roll;
|
||||||
@ -695,7 +694,7 @@ TransportFSM::roll_after_locate () const
|
|||||||
{
|
{
|
||||||
bool for_loop = _last_locate.for_loop_end;
|
bool for_loop = _last_locate.for_loop_end;
|
||||||
DEBUG_TRACE (DEBUG::TFSMEvents, string_compose ("rolling after locate, was for_loop ? %1\n", for_loop));
|
DEBUG_TRACE (DEBUG::TFSMEvents, string_compose ("rolling after locate, was for_loop ? %1\n", for_loop));
|
||||||
current_roll_after_locate_status = boost::none;
|
current_roll_after_locate_status = std::nullopt;
|
||||||
|
|
||||||
if (most_recently_requested_speed == std::numeric_limits<double>::max()) {
|
if (most_recently_requested_speed == std::numeric_limits<double>::max()) {
|
||||||
/* we started rolling without ever setting speed; that's an implicit
|
/* we started rolling without ever setting speed; that's an implicit
|
||||||
|
@ -160,7 +160,7 @@ TransportMasterManager::pre_process_transport_masters (pframes_t nframes, sample
|
|||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<samplepos_t> session_pos;
|
std::optional<samplepos_t> session_pos;
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
session_pos = _session->audible_sample();
|
session_pos = _session->audible_sample();
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SMTG_OS_LINUX
|
#if SMTG_OS_LINUX
|
||||||
#include <boost/unordered_map.hpp>
|
#include <unordered_map>
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -102,8 +102,8 @@ private:
|
|||||||
guint _source_id;
|
guint _source_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
boost::unordered_map<FileDescriptor, EventHandler> _event_handlers;
|
std::unordered_map<FileDescriptor, EventHandler> _event_handlers;
|
||||||
boost::unordered_map<guint, Linux::ITimerHandler*> _timer_handlers;
|
std::unordered_map<guint, Linux::ITimerHandler*> _timer_handlers;
|
||||||
|
|
||||||
static gboolean event (GIOChannel* source, GIOCondition condition, gpointer data)
|
static gboolean event (GIOChannel* source, GIOCondition condition, gpointer data)
|
||||||
{
|
{
|
||||||
@ -132,11 +132,11 @@ public:
|
|||||||
|
|
||||||
void clear () {
|
void clear () {
|
||||||
Glib::Threads::Mutex::Lock lm (_lock);
|
Glib::Threads::Mutex::Lock lm (_lock);
|
||||||
for (boost::unordered_map<FileDescriptor, EventHandler>::const_iterator it = _event_handlers.begin (); it != _event_handlers.end (); ++it) {
|
for (std::unordered_map<FileDescriptor, EventHandler>::const_iterator it = _event_handlers.begin (); it != _event_handlers.end (); ++it) {
|
||||||
g_source_remove (it->second._source_id);
|
g_source_remove (it->second._source_id);
|
||||||
g_io_channel_unref (it->second._gio_channel);
|
g_io_channel_unref (it->second._gio_channel);
|
||||||
}
|
}
|
||||||
for (boost::unordered_map<guint, Linux::ITimerHandler*>::const_iterator it = _timer_handlers.begin (); it != _timer_handlers.end (); ++it) {
|
for (std::unordered_map<guint, Linux::ITimerHandler*>::const_iterator it = _timer_handlers.begin (); it != _timer_handlers.end (); ++it) {
|
||||||
g_source_remove (it->first);
|
g_source_remove (it->first);
|
||||||
}
|
}
|
||||||
_event_handlers.clear ();
|
_event_handlers.clear ();
|
||||||
@ -165,7 +165,7 @@ public:
|
|||||||
|
|
||||||
tresult rv = false;
|
tresult rv = false;
|
||||||
Glib::Threads::Mutex::Lock lm (_lock);
|
Glib::Threads::Mutex::Lock lm (_lock);
|
||||||
for (boost::unordered_map<FileDescriptor, EventHandler>::const_iterator it = _event_handlers.begin (); it != _event_handlers.end ();) {
|
for (std::unordered_map<FileDescriptor, EventHandler>::const_iterator it = _event_handlers.begin (); it != _event_handlers.end ();) {
|
||||||
if (it->second._handler == handler) {
|
if (it->second._handler == handler) {
|
||||||
g_source_remove (it->second._source_id);
|
g_source_remove (it->second._source_id);
|
||||||
g_io_channel_unref (it->second._gio_channel);
|
g_io_channel_unref (it->second._gio_channel);
|
||||||
@ -198,7 +198,7 @@ public:
|
|||||||
|
|
||||||
tresult rv = false;
|
tresult rv = false;
|
||||||
Glib::Threads::Mutex::Lock lm (_lock);
|
Glib::Threads::Mutex::Lock lm (_lock);
|
||||||
for (boost::unordered_map<guint, Linux::ITimerHandler*>::const_iterator it = _timer_handlers.begin (); it != _timer_handlers.end ();) {
|
for (std::unordered_map<guint, Linux::ITimerHandler*>::const_iterator it = _timer_handlers.begin (); it != _timer_handlers.end ();) {
|
||||||
if (it->second == handler) {
|
if (it->second == handler) {
|
||||||
g_source_remove (it->first);
|
g_source_remove (it->first);
|
||||||
it = _timer_handlers.erase (it);
|
it = _timer_handlers.erase (it);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#ifndef AUDIOGRAPHER_PROCESS_CONTEXT_H
|
#ifndef AUDIOGRAPHER_PROCESS_CONTEXT_H
|
||||||
#define AUDIOGRAPHER_PROCESS_CONTEXT_H
|
#define AUDIOGRAPHER_PROCESS_CONTEXT_H
|
||||||
|
|
||||||
#include <boost/static_assert.hpp>
|
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
|
|
||||||
#include "audiographer/visibility.h"
|
#include "audiographer/visibility.h"
|
||||||
@ -28,7 +27,7 @@ class /*LIBAUDIOGRAPHER_API*/ ProcessContext
|
|||||||
// This will need to be modified if if it's modified above
|
// This will need to be modified if if it's modified above
|
||||||
static const ThrowLevel throwLevel = DEFAULT_THROW_LEVEL;
|
static const ThrowLevel throwLevel = DEFAULT_THROW_LEVEL;
|
||||||
|
|
||||||
BOOST_STATIC_ASSERT (std::is_trivially_destructible<T>::value);
|
static_assert (std::is_trivially_destructible<T>::value);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#ifndef AUDIOGRAPHER_TYPE_UTILS_H
|
#ifndef AUDIOGRAPHER_TYPE_UTILS_H
|
||||||
#define AUDIOGRAPHER_TYPE_UTILS_H
|
#define AUDIOGRAPHER_TYPE_UTILS_H
|
||||||
|
|
||||||
#include <boost/static_assert.hpp>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -30,7 +29,7 @@ class LIBAUDIOGRAPHER_API TypeUtilsBase
|
|||||||
template<typename T = DefaultSampleType>
|
template<typename T = DefaultSampleType>
|
||||||
class /*LIBAUDIOGRAPHER_API*/ TypeUtils : private TypeUtilsBase
|
class /*LIBAUDIOGRAPHER_API*/ TypeUtils : private TypeUtilsBase
|
||||||
{
|
{
|
||||||
BOOST_STATIC_ASSERT (std::is_trivially_destructible<T>::value);
|
static_assert (std::is_trivially_destructible<T>::value);
|
||||||
|
|
||||||
typedef std::bool_constant<std::is_floating_point<T>::value ||
|
typedef std::bool_constant<std::is_floating_point<T>::value ||
|
||||||
std::is_signed<T>::value> zero_fillable;
|
std::is_signed<T>::value> zero_fillable;
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
|
||||||
#include <boost/tokenizer.hpp>
|
#include <boost/tokenizer.hpp>
|
||||||
|
|
||||||
#include "alsa_audiobackend.h"
|
#include "alsa_audiobackend.h"
|
||||||
@ -1002,7 +1001,7 @@ AlsaAudioBackend::_start (bool for_latency_measurement)
|
|||||||
|
|
||||||
boost::tokenizer<boost::char_separator<char> > devs (ext, sep);
|
boost::tokenizer<boost::char_separator<char> > devs (ext, sep);
|
||||||
|
|
||||||
BOOST_FOREACH (const std::string& tmp, devs) {
|
for (const std::string& tmp : devs) {
|
||||||
std::string dev (tmp);
|
std::string dev (tmp);
|
||||||
unsigned int sr = _samplerate;
|
unsigned int sr = _samplerate;
|
||||||
unsigned int spp = _samples_per_period;
|
unsigned int spp = _samples_per_period;
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
#define __push2_meter_h__
|
#define __push2_meter_h__
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <boost/tuple/tuple.hpp>
|
#include <tuple>
|
||||||
#include <boost/tuple/tuple_comparison.hpp>
|
|
||||||
|
|
||||||
#include <cairomm/pattern.h>
|
#include <cairomm/pattern.h>
|
||||||
#include <cairomm/region.h>
|
#include <cairomm/region.h>
|
||||||
@ -156,9 +155,9 @@ class Meter : public Item {
|
|||||||
|| (dim == rhs.dim && stp == rhs.stp && cols < rhs.cols)
|
|| (dim == rhs.dim && stp == rhs.stp && cols < rhs.cols)
|
||||||
|| (dim == rhs.dim && stp == rhs.stp && cols == rhs.cols && style < rhs.style);
|
|| (dim == rhs.dim && stp == rhs.stp && cols == rhs.cols && style < rhs.style);
|
||||||
}
|
}
|
||||||
boost::tuple<int, int> dim;
|
std::tuple<int, int> dim;
|
||||||
boost::tuple<float, float, float, float> stp;
|
std::tuple<float, float, float, float> stp;
|
||||||
boost::tuple<int, int, int, int, int, int, int, int, int, int> cols;
|
std::tuple<int, int, int, int, int, int, int, int, int, int> cols;
|
||||||
int style;
|
int style;
|
||||||
};
|
};
|
||||||
typedef std::map<Pattern10MapKey, Cairo::RefPtr<Cairo::Pattern> > Pattern10Map;
|
typedef std::map<Pattern10MapKey, Cairo::RefPtr<Cairo::Pattern> > Pattern10Map;
|
||||||
@ -172,8 +171,8 @@ class Meter : public Item {
|
|||||||
inline bool operator<(const PatternBgMapKey& rhs) const {
|
inline bool operator<(const PatternBgMapKey& rhs) const {
|
||||||
return (dim < rhs.dim) || (dim == rhs.dim && cols < rhs.cols) || (dim == rhs.dim && cols == rhs.cols && (sh && !rhs.sh));
|
return (dim < rhs.dim) || (dim == rhs.dim && cols < rhs.cols) || (dim == rhs.dim && cols == rhs.cols && (sh && !rhs.sh));
|
||||||
}
|
}
|
||||||
boost::tuple<int, int> dim;
|
std::tuple<int, int> dim;
|
||||||
boost::tuple<int, int> cols;
|
std::tuple<int, int> cols;
|
||||||
bool sh;
|
bool sh;
|
||||||
};
|
};
|
||||||
typedef std::map<PatternBgMapKey, Cairo::RefPtr<Cairo::Pattern> > PatternBgMap;
|
typedef std::map<PatternBgMapKey, Cairo::RefPtr<Cairo::Pattern> > PatternBgMap;
|
||||||
|
@ -27,7 +27,7 @@ ArrowTest::bounding_box ()
|
|||||||
|
|
||||||
arrow.set_outline_width (0);
|
arrow.set_outline_width (0);
|
||||||
|
|
||||||
boost::optional<Rect> bbox = arrow.bounding_box ();
|
std::optional<Rect> bbox = arrow.bounding_box ();
|
||||||
|
|
||||||
CPPUNIT_ASSERT (bbox.is_initialized ());
|
CPPUNIT_ASSERT (bbox.is_initialized ());
|
||||||
CPPUNIT_ASSERT (bbox.value().x0 == -6);
|
CPPUNIT_ASSERT (bbox.value().x0 == -6);
|
||||||
|
@ -23,7 +23,7 @@ GroupTest::bounding_box ()
|
|||||||
c.set_outline_width (0);
|
c.set_outline_width (0);
|
||||||
Rectangle d (canvas.root(), Rect (33, 33, 64, 64));
|
Rectangle d (canvas.root(), Rect (33, 33, 64, 64));
|
||||||
d.set_outline_width (0);
|
d.set_outline_width (0);
|
||||||
boost::optional<Rect> bbox = canvas.root()->bounding_box ();
|
std::optional<Rect> bbox = canvas.root()->bounding_box ();
|
||||||
|
|
||||||
/* check the bounding box */
|
/* check the bounding box */
|
||||||
CPPUNIT_ASSERT (bbox.is_initialized ());
|
CPPUNIT_ASSERT (bbox.is_initialized ());
|
||||||
@ -51,7 +51,7 @@ GroupTest::null_bounding_box ()
|
|||||||
|
|
||||||
Group empty (canvas.root());
|
Group empty (canvas.root());
|
||||||
|
|
||||||
boost::optional<Rect> bbox = empty.bounding_box ();
|
std::optional<Rect> bbox = empty.bounding_box ();
|
||||||
CPPUNIT_ASSERT (!bbox.is_initialized ());
|
CPPUNIT_ASSERT (!bbox.is_initialized ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ GroupTest::children_changing ()
|
|||||||
a.set_outline_width (0);
|
a.set_outline_width (0);
|
||||||
|
|
||||||
/* Check that initial bbox */
|
/* Check that initial bbox */
|
||||||
boost::optional<Rect> bbox = canvas.root()->bounding_box ();
|
std::optional<Rect> bbox = canvas.root()->bounding_box ();
|
||||||
CPPUNIT_ASSERT (bbox.is_initialized ());
|
CPPUNIT_ASSERT (bbox.is_initialized ());
|
||||||
CPPUNIT_ASSERT (bbox.value().x0 == 0);
|
CPPUNIT_ASSERT (bbox.value().x0 == 0);
|
||||||
CPPUNIT_ASSERT (bbox.value().y0 == 0);
|
CPPUNIT_ASSERT (bbox.value().y0 == 0);
|
||||||
@ -156,7 +156,7 @@ GroupTest::grandchildren_changing ()
|
|||||||
a.set_outline_width (0);
|
a.set_outline_width (0);
|
||||||
|
|
||||||
/* Check the initial bboxes */
|
/* Check the initial bboxes */
|
||||||
boost::optional<Rect> bbox = canvas.root()->bounding_box ();
|
std::optional<Rect> bbox = canvas.root()->bounding_box ();
|
||||||
CPPUNIT_ASSERT (bbox.is_initialized ());
|
CPPUNIT_ASSERT (bbox.is_initialized ());
|
||||||
CPPUNIT_ASSERT (bbox.value().x0 == 0);
|
CPPUNIT_ASSERT (bbox.value().x0 == 0);
|
||||||
CPPUNIT_ASSERT (bbox.value().y0 == 0);
|
CPPUNIT_ASSERT (bbox.value().y0 == 0);
|
||||||
@ -276,7 +276,7 @@ GroupTest::torture_add_items_at_point ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (list<Item*>::iterator j = rectangles.begin(); j != rectangles.end(); ++j) {
|
for (list<Item*>::iterator j = rectangles.begin(); j != rectangles.end(); ++j) {
|
||||||
boost::optional<Rect> bbox = (*j)->bounding_box ();
|
std::optional<Rect> bbox = (*j)->bounding_box ();
|
||||||
assert (bbox);
|
assert (bbox);
|
||||||
if (bbox.value().contains (test)) {
|
if (bbox.value().contains (test)) {
|
||||||
items_B.push_back (*j);
|
items_B.push_back (*j);
|
||||||
|
@ -29,7 +29,7 @@ PolygonTest::bounding_box ()
|
|||||||
/* should now have a bounding box around those points,
|
/* should now have a bounding box around those points,
|
||||||
taking into account default line width
|
taking into account default line width
|
||||||
*/
|
*/
|
||||||
boost::optional<Rect> bbox = polygon.bounding_box ();
|
std::optional<Rect> bbox = polygon.bounding_box ();
|
||||||
CPPUNIT_ASSERT (bbox.is_initialized ());
|
CPPUNIT_ASSERT (bbox.is_initialized ());
|
||||||
CPPUNIT_ASSERT (bbox.value().x0 == -6.25);
|
CPPUNIT_ASSERT (bbox.value().x0 == -6.25);
|
||||||
CPPUNIT_ASSERT (bbox.value().x1 == 6.25);
|
CPPUNIT_ASSERT (bbox.value().x1 == 6.25);
|
||||||
|
@ -12,7 +12,7 @@ TypesTest::intersect ()
|
|||||||
{
|
{
|
||||||
Rect a (0, 0, 1024, 1024);
|
Rect a (0, 0, 1024, 1024);
|
||||||
Rect b (0, 0, 512, 512);
|
Rect b (0, 0, 512, 512);
|
||||||
boost::optional<Rect> c = a.intersection (b);
|
std::optional<Rect> c = a.intersection (b);
|
||||||
|
|
||||||
CPPUNIT_ASSERT (c.is_initialized ());
|
CPPUNIT_ASSERT (c.is_initialized ());
|
||||||
CPPUNIT_ASSERT (c->x0 == 0);
|
CPPUNIT_ASSERT (c->x0 == 0);
|
||||||
@ -24,7 +24,7 @@ TypesTest::intersect ()
|
|||||||
{
|
{
|
||||||
Rect a (0, 0, 512, 512);
|
Rect a (0, 0, 512, 512);
|
||||||
Rect b (513, 513, 1024, 1024);
|
Rect b (513, 513, 1024, 1024);
|
||||||
boost::optional<Rect> c = a.intersection (b);
|
std::optional<Rect> c = a.intersection (b);
|
||||||
|
|
||||||
CPPUNIT_ASSERT (!c.is_initialized ());
|
CPPUNIT_ASSERT (!c.is_initialized ());
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ Parser::process_mtc_quarter_frame (MIDI::byte *msg)
|
|||||||
true, just ignore this in terms of it being an error.
|
true, just ignore this in terms of it being an error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
boost::optional<bool> res = mtc_skipped ();
|
std::optional<bool> res = mtc_skipped ();
|
||||||
|
|
||||||
if (res.value_or (false)) {
|
if (res.value_or (false)) {
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ void
|
|||||||
Parser::scanner (unsigned char inbyte)
|
Parser::scanner (unsigned char inbyte)
|
||||||
{
|
{
|
||||||
bool statusbit;
|
bool statusbit;
|
||||||
boost::optional<int> edit_result;
|
std::optional<int> edit_result;
|
||||||
|
|
||||||
// cerr << "parse: " << hex << (int) inbyte << dec << " state = " << state << " msgindex = " << msgindex << " runnable = " << runnable << endl;
|
// cerr << "parse: " << hex << (int) inbyte << dec << " state = " << state << " msgindex = " << msgindex << " runnable = " << runnable << endl;
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ Parser::scanner (unsigned char inbyte)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rtmsg) {
|
if (rtmsg) {
|
||||||
boost::optional<int> res = edit (&inbyte, 1);
|
std::optional<int> res = edit (&inbyte, 1);
|
||||||
|
|
||||||
if (res.value_or (1) >= 0 && !_offline) {
|
if (res.value_or (1) >= 0 && !_offline) {
|
||||||
realtime_msg (inbyte);
|
realtime_msg (inbyte);
|
||||||
@ -430,7 +430,7 @@ Parser::scanner (unsigned char inbyte)
|
|||||||
#endif
|
#endif
|
||||||
if (msgindex > 0) {
|
if (msgindex > 0) {
|
||||||
|
|
||||||
boost::optional<int> res = edit (msgbuf, msgindex);
|
std::optional<int> res = edit (msgbuf, msgindex);
|
||||||
|
|
||||||
if (res.value_or (1) >= 0) {
|
if (res.value_or (1) >= 0) {
|
||||||
if (!possible_mmc (msgbuf, msgindex) || _mmc_forward) {
|
if (!possible_mmc (msgbuf, msgindex) || _mmc_forward) {
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <boost/bind/protect.hpp>
|
#include <boost/bind/protect.hpp>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
#include <boost/enable_shared_from_this.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
#include "pbd/libpbd_visibility.h"
|
#include "pbd/libpbd_visibility.h"
|
||||||
#include "pbd/event_loop.h"
|
#include "pbd/event_loop.h"
|
||||||
@ -87,7 +87,7 @@ template<typename R>
|
|||||||
class /*LIBPBD_API*/ OptionalLastValue
|
class /*LIBPBD_API*/ OptionalLastValue
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef boost::optional<R> result_type;
|
typedef std::optional<R> result_type;
|
||||||
|
|
||||||
template <typename Iter>
|
template <typename Iter>
|
||||||
result_type operator() (Iter first, Iter last) const {
|
result_type operator() (Iter first, Iter last) const {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
|
|
||||||
#include "pbd/abstract_ui.cc" // instantiate template
|
#include "pbd/abstract_ui.cc" // instantiate template
|
||||||
#include "pbd/controllable.h"
|
#include "pbd/controllable.h"
|
||||||
@ -1112,7 +1112,7 @@ void
|
|||||||
Console1::create_strip_inventory ()
|
Console1::create_strip_inventory ()
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::Console1, "create_strip_inventory()\n");
|
DEBUG_TRACE (DEBUG::Console1, "create_strip_inventory()\n");
|
||||||
boost::optional<order_t> master_order;
|
std::optional<order_t> master_order;
|
||||||
strip_inventory.clear ();
|
strip_inventory.clear ();
|
||||||
StripableList sl = session->get_stripables ();
|
StripableList sl = session->get_stripables ();
|
||||||
uint32_t index = 0;
|
uint32_t index = 0;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef _ardour_surface_websockets_dispatcher_h_
|
#ifndef _ardour_surface_websockets_dispatcher_h_
|
||||||
#define _ardour_surface_websockets_dispatcher_h_
|
#define _ardour_surface_websockets_dispatcher_h_
|
||||||
|
|
||||||
#include <boost/unordered_map.hpp>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "component.h"
|
#include "component.h"
|
||||||
@ -39,7 +39,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
typedef void (WebsocketsDispatcher::*DispatcherMethod) (Client, const NodeStateMessage&);
|
typedef void (WebsocketsDispatcher::*DispatcherMethod) (Client, const NodeStateMessage&);
|
||||||
typedef boost::unordered_map<std::string, DispatcherMethod> NodeMethodMap;
|
typedef std::unordered_map<std::string, DispatcherMethod> NodeMethodMap;
|
||||||
|
|
||||||
static NodeMethodMap _node_to_method;
|
static NodeMethodMap _node_to_method;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef _ardour_surface_websockets_server_h_
|
#ifndef _ardour_surface_websockets_server_h_
|
||||||
#define _ardour_surface_websockets_server_h_
|
#define _ardour_surface_websockets_server_h_
|
||||||
|
|
||||||
#include <boost/unordered_map.hpp>
|
#include <unordered_map>
|
||||||
#include <glibmm.h>
|
#include <glibmm.h>
|
||||||
#include <libwebsockets.h>
|
#include <libwebsockets.h>
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ private:
|
|||||||
struct lws_context_creation_info _lws_info;
|
struct lws_context_creation_info _lws_info;
|
||||||
struct lws_context* _lws_context;
|
struct lws_context* _lws_context;
|
||||||
|
|
||||||
typedef boost::unordered_map<Client, ClientContext> ClientContextMap;
|
typedef std::unordered_map<Client, ClientContext> ClientContextMap;
|
||||||
ClientContextMap _client_ctx;
|
ClientContextMap _client_ctx;
|
||||||
|
|
||||||
ServerResources _resources;
|
ServerResources _resources;
|
||||||
@ -90,7 +90,7 @@ private:
|
|||||||
|
|
||||||
Glib::RefPtr<Glib::IOChannel> _channel;
|
Glib::RefPtr<Glib::IOChannel> _channel;
|
||||||
|
|
||||||
typedef boost::unordered_map<lws_sockfd_type, LwsPollFdGlibSource> LwsPollFdGlibSourceMap;
|
typedef std::unordered_map<lws_sockfd_type, LwsPollFdGlibSource> LwsPollFdGlibSourceMap;
|
||||||
LwsPollFdGlibSourceMap _fd_ctx;
|
LwsPollFdGlibSourceMap _fd_ctx;
|
||||||
|
|
||||||
bool _fd_callbacks;
|
bool _fd_callbacks;
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
#define _WIDGETS_FAST_METER_H_
|
#define _WIDGETS_FAST_METER_H_
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <boost/tuple/tuple.hpp>
|
#include <tuple>
|
||||||
#include <boost/tuple/tuple_comparison.hpp>
|
|
||||||
#include <cairomm/pattern.h>
|
#include <cairomm/pattern.h>
|
||||||
#include "gtkmm2ext/cairo_widget.h"
|
#include "gtkmm2ext/cairo_widget.h"
|
||||||
|
|
||||||
@ -143,9 +142,9 @@ private:
|
|||||||
|| (dim == rhs.dim && stp == rhs.stp && cols < rhs.cols)
|
|| (dim == rhs.dim && stp == rhs.stp && cols < rhs.cols)
|
||||||
|| (dim == rhs.dim && stp == rhs.stp && cols == rhs.cols && style < rhs.style);
|
|| (dim == rhs.dim && stp == rhs.stp && cols == rhs.cols && style < rhs.style);
|
||||||
}
|
}
|
||||||
boost::tuple<int, int> dim;
|
std::tuple<int, int> dim;
|
||||||
boost::tuple<float, float, float, float> stp;
|
std::tuple<float, float, float, float> stp;
|
||||||
boost::tuple<int, int, int, int, int, int, int, int, int, int> cols;
|
std::tuple<int, int, int, int, int, int, int, int, int, int> cols;
|
||||||
int style;
|
int style;
|
||||||
};
|
};
|
||||||
typedef std::map<Pattern10MapKey, Cairo::RefPtr<Cairo::Pattern> > Pattern10Map;
|
typedef std::map<Pattern10MapKey, Cairo::RefPtr<Cairo::Pattern> > Pattern10Map;
|
||||||
@ -159,8 +158,8 @@ private:
|
|||||||
inline bool operator<(const PatternBgMapKey& rhs) const {
|
inline bool operator<(const PatternBgMapKey& rhs) const {
|
||||||
return (dim < rhs.dim) || (dim == rhs.dim && cols < rhs.cols) || (dim == rhs.dim && cols == rhs.cols && (sh && !rhs.sh));
|
return (dim < rhs.dim) || (dim == rhs.dim && cols < rhs.cols) || (dim == rhs.dim && cols == rhs.cols && (sh && !rhs.sh));
|
||||||
}
|
}
|
||||||
boost::tuple<int, int> dim;
|
std::tuple<int, int> dim;
|
||||||
boost::tuple<int, int> cols;
|
std::tuple<int, int> cols;
|
||||||
bool sh;
|
bool sh;
|
||||||
};
|
};
|
||||||
typedef std::map<PatternBgMapKey, Cairo::RefPtr<Cairo::Pattern> > PatternBgMap;
|
typedef std::map<PatternBgMapKey, Cairo::RefPtr<Cairo::Pattern> > PatternBgMap;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef _WIDGETS_FRAME_H_
|
#ifndef _WIDGETS_FRAME_H_
|
||||||
#define _WIDGETS_FRAME_H_
|
#define _WIDGETS_FRAME_H_
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <optional>
|
||||||
#include <gtkmm/bin.h>
|
#include <gtkmm/bin.h>
|
||||||
|
|
||||||
#include "gtkmm2ext/colors.h"
|
#include "gtkmm2ext/colors.h"
|
||||||
@ -65,7 +65,7 @@ private:
|
|||||||
sigc::connection _parent_style_change;
|
sigc::connection _parent_style_change;
|
||||||
Glib::RefPtr<Pango::Layout> _layout;
|
Glib::RefPtr<Pango::Layout> _layout;
|
||||||
std::string _label_text;
|
std::string _label_text;
|
||||||
boost::optional<Gdk::Color> _edge_color;
|
std::optional<Gdk::Color> _edge_color;
|
||||||
GtkRequisition _min_size;
|
GtkRequisition _min_size;
|
||||||
|
|
||||||
int _border;
|
int _border;
|
||||||
|
Loading…
Reference in New Issue
Block a user