diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/BlockImpl.hpp | 2 | ||||
-rw-r--r-- | src/server/BufferFactory.cpp | 8 | ||||
-rw-r--r-- | src/server/LV2Block.cpp | 2 | ||||
-rw-r--r-- | src/server/LV2Options.hpp | 2 | ||||
-rw-r--r-- | src/server/SocketListener.cpp | 4 | ||||
-rw-r--r-- | src/server/Worker.cpp | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp index ed3566aa..9d63f78e 100644 --- a/src/server/BlockImpl.hpp +++ b/src/server/BlockImpl.hpp @@ -117,7 +117,7 @@ public: /** Save current state as preset. */ virtual boost::optional<Resource> save_preset(const URI& bundle, - const Properties& props) { return boost::optional<Resource>(); } + const Properties& props) { return {}; } /** Learn the next incoming MIDI event (for internals) */ virtual void learn() {} diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp index 348dbca6..8ed4eaae 100644 --- a/src/server/BufferFactory.cpp +++ b/src/server/BufferFactory.cpp @@ -150,7 +150,7 @@ BufferFactory::get_buffer(LV2_URID type, try_head->_next = nullptr; try_head->set_type(&BufferFactory::get_buffer, type, value_type); try_head->clear(); - return BufferRef(try_head); + return {try_head}; } BufferRef @@ -159,12 +159,12 @@ BufferFactory::claim_buffer(LV2_URID type, LV2_URID value_type, uint32_t) Buffer* try_head = try_get_buffer(type); if (!try_head) { _engine.world().log().rt_error("Failed to obtain buffer"); - return BufferRef(); + return {}; } try_head->_next = nullptr; try_head->set_type(&BufferFactory::claim_buffer, type, value_type); - return BufferRef(try_head); + return {try_head}; } BufferRef @@ -185,7 +185,7 @@ BufferFactory::create(LV2_URID type, LV2_URID value_type, uint32_t capacity) capacity = std::max(capacity, default_size(_uris.atom_Sound)); } - return BufferRef(new Buffer(*this, type, value_type, capacity)); + return {new Buffer(*this, type, value_type, capacity)}; } void diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp index 35a06368..4cdcecd7 100644 --- a/src/server/LV2Block.cpp +++ b/src/server/LV2Block.cpp @@ -758,7 +758,7 @@ LV2Block::save_preset(const URI& uri, return {preset}; } - return boost::optional<Resource>(); + return {}; } void diff --git a/src/server/LV2Options.hpp b/src/server/LV2Options.hpp index 50544e01..02824be6 100644 --- a/src/server/LV2Options.hpp +++ b/src/server/LV2Options.hpp @@ -66,7 +66,7 @@ public: f->URI = LV2_OPTIONS__options; f->data = malloc(sizeof(options)); memcpy(f->data, options, sizeof(options)); - return std::shared_ptr<LV2_Feature>(f, &free_feature); + return {f, &free_feature}; } private: diff --git a/src/server/SocketListener.cpp b/src/server/SocketListener.cpp index 0d377732..ed874634 100644 --- a/src/server/SocketListener.cpp +++ b/src/server/SocketListener.cpp @@ -51,7 +51,7 @@ get_link_target(const char* link_path) // Stat the link to get the required size for the target path struct stat link_stat{}; if (lstat(link_path, &link_stat)) { - return std::string(); + return {}; } // Allocate buffer and read link target @@ -63,7 +63,7 @@ get_link_target(const char* link_path) } free(target); - return std::string(); + return {}; } static void ingen_listen(Engine* engine, diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp index 149d91e7..5b4da498 100644 --- a/src/server/Worker.cpp +++ b/src/server/Worker.cpp @@ -110,7 +110,7 @@ Worker::Schedule::feature(World&, Node* n) f->URI = LV2_WORKER__schedule; f->data = data; - return std::shared_ptr<LV2_Feature>(f, &free_feature); + return {f, &free_feature}; } Worker::Worker(Log& log, uint32_t buffer_size, bool synchronous) |