From 5223b176f31ec35af1bd3ada625f41a010eb2c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Dom=C3=ADnguez?= Date: Mon, 26 Aug 2024 07:29:47 +0200 Subject: [PATCH] Replace boost::shared_array with std::shared_ptr --- libs/ardour/ardour/audiosource.h | 6 ++---- libs/ardour/ardour/delayline.h | 6 ++---- libs/ardour/delayline.cc | 2 +- libs/ardour/import.cc | 6 ++---- libs/canvas/canvas/image.h | 2 -- .../midi_surface/midi_surface/midi_byte_array.h | 2 -- libs/surfaces/launch_control_xl/midi_byte_array.h | 2 -- libs/surfaces/mackie/mackie_control_protocol.cc | 1 - libs/surfaces/mackie/midi_byte_array.h | 2 -- libs/surfaces/mackie/surface_port.cc | 1 - libs/surfaces/push2/midi_byte_array.h | 2 -- libs/surfaces/us2400/midi_byte_array.h | 2 -- libs/surfaces/us2400/surface_port.cc | 1 - libs/surfaces/us2400/us2400_control_protocol.cc | 1 - 14 files changed, 7 insertions(+), 29 deletions(-) diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index 4160118601..0c0bd049a3 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -24,8 +24,6 @@ #include -#include - #include #include @@ -107,8 +105,8 @@ class LIBARDOUR_API AudioSource : virtual public Source, public ARDOUR::AudioRea thread, or a lock around calls that use them. */ - static std::vector > _mixdown_buffers; - static std::vector > _gain_buffers; + static std::vector > _mixdown_buffers; + static std::vector > _gain_buffers; static Glib::Threads::Mutex _level_buffer_lock; std::string _peakpath; diff --git a/libs/ardour/ardour/delayline.h b/libs/ardour/ardour/delayline.h index 2f23fff7a4..c22db4f26e 100644 --- a/libs/ardour/ardour/delayline.h +++ b/libs/ardour/ardour/delayline.h @@ -20,8 +20,6 @@ #include -#include - #include "ardour/types.h" #include "ardour/processor.h" @@ -67,8 +65,8 @@ private: sampleoffset_t _roff, _woff; bool _pending_flush; - typedef std::vector > AudioDlyBuf; - typedef std::vector > MidiDlyBuf; + typedef std::vector> AudioDlyBuf; + typedef std::vector> MidiDlyBuf; AudioDlyBuf _buf; MidiDlyBuf _midi_buf; diff --git a/libs/ardour/delayline.cc b/libs/ardour/delayline.cc index 64408941f0..2be812b28b 100644 --- a/libs/ardour/delayline.cc +++ b/libs/ardour/delayline.cc @@ -362,7 +362,7 @@ DelayLine::allocate_pending_buffers (samplecnt_t signal_delay, ChanCount const& AudioDlyBuf pending_buf; for (uint32_t i = 0; i < cc.n_audio (); ++i) { - boost::shared_array b (new Sample[rbs]); + std::shared_ptr b (new Sample[rbs]); pending_buf.push_back (b); memset (b.get (), 0, rbs * sizeof (Sample)); } diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index 7232bc158a..833df4440d 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -40,8 +40,6 @@ #include "pbd/gstdio_compat.h" #include -#include - #include "pbd/basename.h" #include "pbd/convert.h" @@ -266,10 +264,10 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status, } std::unique_ptr data(new float[nframes * channels]); - vector > channel_data; + vector > channel_data; for (uint32_t n = 0; n < channels; ++n) { - channel_data.push_back(boost::shared_array(new Sample[nframes])); + channel_data.push_back(std::shared_ptr(new Sample[nframes])); } float gain = 1; diff --git a/libs/canvas/canvas/image.h b/libs/canvas/canvas/image.h index 1d6320a94c..9b913d1d2c 100644 --- a/libs/canvas/canvas/image.h +++ b/libs/canvas/canvas/image.h @@ -23,8 +23,6 @@ #include #include -#include - #include "canvas/visibility.h" #include "canvas/item.h" diff --git a/libs/ctrl-interface/midi_surface/midi_surface/midi_byte_array.h b/libs/ctrl-interface/midi_surface/midi_surface/midi_byte_array.h index 7aaa3bb6e1..676deb99c2 100644 --- a/libs/ctrl-interface/midi_surface/midi_surface/midi_byte_array.h +++ b/libs/ctrl-interface/midi_surface/midi_surface/midi_byte_array.h @@ -21,8 +21,6 @@ #include #include -#include - //#include namespace MIDI { typedef unsigned char byte; diff --git a/libs/surfaces/launch_control_xl/midi_byte_array.h b/libs/surfaces/launch_control_xl/midi_byte_array.h index c7d66c1b44..957c8f0e05 100644 --- a/libs/surfaces/launch_control_xl/midi_byte_array.h +++ b/libs/surfaces/launch_control_xl/midi_byte_array.h @@ -21,8 +21,6 @@ #include #include -#include - //#include namespace MIDI { typedef unsigned char byte; diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index a527f9c5f1..8168717461 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -35,7 +35,6 @@ #include #include -#include #include #include "midi++/types.h" diff --git a/libs/surfaces/mackie/midi_byte_array.h b/libs/surfaces/mackie/midi_byte_array.h index 99497ad2d9..15711eae74 100644 --- a/libs/surfaces/mackie/midi_byte_array.h +++ b/libs/surfaces/mackie/midi_byte_array.h @@ -22,8 +22,6 @@ #include #include -#include - //#include namespace MIDI { typedef unsigned char byte; diff --git a/libs/surfaces/mackie/surface_port.cc b/libs/surfaces/mackie/surface_port.cc index f268b6f55e..695a716944 100644 --- a/libs/surfaces/mackie/surface_port.cc +++ b/libs/surfaces/mackie/surface_port.cc @@ -25,7 +25,6 @@ #include #include -#include #include "pbd/failed_constructor.h" diff --git a/libs/surfaces/push2/midi_byte_array.h b/libs/surfaces/push2/midi_byte_array.h index e336399849..01a9302e65 100644 --- a/libs/surfaces/push2/midi_byte_array.h +++ b/libs/surfaces/push2/midi_byte_array.h @@ -21,8 +21,6 @@ #include #include -#include - //#include namespace MIDI { typedef unsigned char byte; diff --git a/libs/surfaces/us2400/midi_byte_array.h b/libs/surfaces/us2400/midi_byte_array.h index 0f4469c8df..b1ecdc63cf 100644 --- a/libs/surfaces/us2400/midi_byte_array.h +++ b/libs/surfaces/us2400/midi_byte_array.h @@ -21,8 +21,6 @@ #include #include -#include - //#include namespace MIDI { typedef unsigned char byte; diff --git a/libs/surfaces/us2400/surface_port.cc b/libs/surfaces/us2400/surface_port.cc index 00b084bc14..f0027c97f3 100644 --- a/libs/surfaces/us2400/surface_port.cc +++ b/libs/surfaces/us2400/surface_port.cc @@ -21,7 +21,6 @@ #include #include -#include #include "pbd/failed_constructor.h" diff --git a/libs/surfaces/us2400/us2400_control_protocol.cc b/libs/surfaces/us2400/us2400_control_protocol.cc index 0a922ef280..d4c1ea5631 100644 --- a/libs/surfaces/us2400/us2400_control_protocol.cc +++ b/libs/surfaces/us2400/us2400_control_protocol.cc @@ -29,7 +29,6 @@ #include #include -#include #include #include "midi++/types.h"