summaryrefslogtreecommitdiffstats
path: root/src/server/LV2Block.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/LV2Block.hpp')
-rw-r--r--src/server/LV2Block.hpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp
index c8f9e59a..fd446106 100644
--- a/src/server/LV2Block.hpp
+++ b/src/server/LV2Block.hpp
@@ -33,20 +33,20 @@
#include <boost/intrusive/slist.hpp>
#include <boost/intrusive/slist_hook.hpp>
-#include <boost/optional/optional.hpp>
#include <cstdint>
#include <cstdlib>
#include <cstring>
+#include <filesystem>
#include <memory>
#include <mutex>
+#include <optional>
namespace raul {
class Symbol;
} // namespace raul
-namespace boost {
-namespace intrusive {
+namespace boost::intrusive {
template <bool Enabled>
struct cache_last;
@@ -54,12 +54,10 @@ struct cache_last;
template <bool Enabled>
struct constant_time_size;
-} // namespace intrusive
-} // namespace boost
+} // namespace boost::intrusive
namespace ingen {
-class FilePath;
class Resource;
class URIs;
class World;
@@ -91,7 +89,7 @@ public:
bool instantiate(BufferFactory& bufs, const LilvState* state);
LilvInstance* instance() override { return instance(0); }
- bool save_state(const FilePath& dir) const override;
+ bool save_state(const std::filesystem::path& dir) const override;
BlockImpl* duplicate(Engine& engine,
const raul::Symbol& symbol,
@@ -113,19 +111,19 @@ public:
void apply_state(const std::unique_ptr<Worker>& worker,
const LilvState* state) override;
- boost::optional<Resource> save_preset(const URI& uri,
- const Properties& props) override;
+ std::optional<Resource> save_preset(const URI& uri,
+ const Properties& props) override;
void set_port_buffer(uint32_t voice,
uint32_t port_num,
const BufferRef& buf,
SampleCount offset) override;
- static StatePtr load_state(World& world, const FilePath& path);
+ static StatePtr load_state(World& world, const std::filesystem::path& path);
protected:
struct Instance : public raul::Noncopyable {
- explicit Instance(LilvInstance* i) : instance(i) {}
+ explicit Instance(LilvInstance* i) noexcept : instance(i) {}
~Instance() { lilv_instance_free(instance); }
@@ -151,9 +149,8 @@ protected:
struct Response : public raul::Maid::Disposable
, public raul::Noncopyable
- , public boost::intrusive::slist_base_hook<>
- {
- inline Response(uint32_t s, const void* d)
+ , public boost::intrusive::slist_base_hook<> {
+ Response(uint32_t s, const void* d)
: size(s)
, data(malloc(s))
{
@@ -179,7 +176,7 @@ protected:
LV2Plugin* _lv2_plugin;
raul::managed_ptr<Instances> _instances;
raul::managed_ptr<Instances> _prepared_instances;
- const LV2_Worker_Interface* _worker_iface;
+ const LV2_Worker_Interface* _worker_iface{nullptr};
std::mutex _work_mutex;
Responses _responses;
std::shared_ptr<LV2Features::FeatureArray> _features;