summaryrefslogtreecommitdiffstats
path: root/src/server/BufferFactory.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-09-27 18:35:31 -0400
committerDavid Robillard <d@drobilla.net>2022-09-27 18:36:33 -0400
commit92cf4f1e48a90d8622f237a732b08487e0cde46c (patch)
tree9b9cdeeb50b14bf8d64e2c6e914573303a7cc61c /src/server/BufferFactory.cpp
parent3ae3c86937c7ffc45d24e36a33560cd63ebb900b (diff)
downloadingen-92cf4f1e48a90d8622f237a732b08487e0cde46c.tar.gz
ingen-92cf4f1e48a90d8622f237a732b08487e0cde46c.tar.bz2
ingen-92cf4f1e48a90d8622f237a732b08487e0cde46c.zip
Use braced init lists to avoid repeating return types
Diffstat (limited to 'src/server/BufferFactory.cpp')
-rw-r--r--src/server/BufferFactory.cpp8
1 files changed, 4 insertions, 4 deletions
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