summaryrefslogtreecommitdiffstats
path: root/src/server/events/Delta.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 19:13:33 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 20:59:06 +0100
commit14cd32a043552d39738ae0e84e4ef8ab93783296 (patch)
tree829845243215ed3fd96ff8fd6d6f324c35a60b3e /src/server/events/Delta.cpp
parent88dff1aabd3c81d1d81ac256e0061b98e0d24cec (diff)
downloadingen-14cd32a043552d39738ae0e84e4ef8ab93783296.tar.gz
ingen-14cd32a043552d39738ae0e84e4ef8ab93783296.tar.bz2
ingen-14cd32a043552d39738ae0e84e4ef8ab93783296.zip
Cleanup: Use "auto" to avoid repeating type names
Diffstat (limited to 'src/server/events/Delta.cpp')
-rw-r--r--src/server/events/Delta.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 19e5bb20..6ecddc1e 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -132,8 +132,8 @@ Delta::add_set_event(const char* port_symbol,
uint32_t size,
uint32_t type)
{
- BlockImpl* block = dynamic_cast<BlockImpl*>(_object);
- PortImpl* port = block->port_by_symbol(port_symbol);
+ auto* block = dynamic_cast<BlockImpl*>(_object);
+ auto* port = block->port_by_symbol(port_symbol);
if (!port) {
_engine.log().warn("Unknown port `%1%' in state", port_symbol);
return;
@@ -204,7 +204,7 @@ Delta::pre_process(PreProcessContext& ctx)
return Event::pre_process_done(Status::NOT_FOUND, prot);
}
- BlockImpl* block = dynamic_cast<BlockImpl*>(node);
+ auto* block = dynamic_cast<BlockImpl*>(node);
if (!block) {
return Event::pre_process_done(Status::BAD_OBJECT_TYPE, prot);
}
@@ -256,14 +256,14 @@ Delta::pre_process(PreProcessContext& ctx)
_types.reserve(_properties.size());
- NodeImpl* obj = dynamic_cast<NodeImpl*>(_object);
+ auto* obj = dynamic_cast<NodeImpl*>(_object);
// Remove any properties removed in delta
for (const auto& r : _remove) {
const URI& key = r.first;
const Atom& value = r.second;
if (key == uris.midi_binding && value == uris.patch_wildcard) {
- PortImpl* port = dynamic_cast<PortImpl*>(_object);
+ auto* port = dynamic_cast<PortImpl*>(_object);
if (port) {
_engine.control_bindings()->get_all(port->path(), _removed_bindings);
}
@@ -325,7 +325,7 @@ Delta::pre_process(PreProcessContext& ctx)
}
BlockImpl* block = nullptr;
- PortImpl* port = dynamic_cast<PortImpl*>(_object);
+ auto* port = dynamic_cast<PortImpl*>(_object);
if (port) {
if (key == uris.ingen_broadcast) {
if (value.type() == uris.forge.Bool) {
@@ -418,7 +418,7 @@ Delta::pre_process(PreProcessContext& ctx)
}
if (!_create_event && key == uris.ingen_polyphonic) {
- GraphImpl* parent = dynamic_cast<GraphImpl*>(obj->parent());
+ auto* parent = dynamic_cast<GraphImpl*>(obj->parent());
if (!parent) {
_status = Status::BAD_OBJECT_TYPE;
} else if (value.type() != uris.forge.Bool) {
@@ -426,7 +426,7 @@ Delta::pre_process(PreProcessContext& ctx)
} else {
op = SpecialType::POLYPHONIC;
obj->set_property(key, value, value.context());
- BlockImpl* block = dynamic_cast<BlockImpl*>(obj);
+ auto* block = dynamic_cast<BlockImpl*>(obj);
if (block) {
block->set_polyphonic(value.get<int32_t>());
}
@@ -497,9 +497,9 @@ Delta::execute(RunContext& context)
_engine.control_bindings()->remove(context, _removed_bindings);
}
- NodeImpl* const object = dynamic_cast<NodeImpl*>(_object);
- BlockImpl* const block = dynamic_cast<BlockImpl*>(_object);
- PortImpl* const port = dynamic_cast<PortImpl*>(_object);
+ auto* const object = dynamic_cast<NodeImpl*>(_object);
+ auto* const block = dynamic_cast<BlockImpl*>(_object);
+ auto* const port = dynamic_cast<PortImpl*>(_object);
std::vector<SpecialType>::const_iterator t = _types.begin();
for (const auto& p : _properties) {
@@ -578,7 +578,7 @@ void
Delta::post_process()
{
if (_state) {
- BlockImpl* block = dynamic_cast<BlockImpl*>(_object);
+ auto* block = dynamic_cast<BlockImpl*>(_object);
if (block) {
block->apply_state(_engine.sync_worker(), _state);
block->set_enabled(true);