summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 21:10:02 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 21:11:35 +0100
commitafffecae1c567bac1622d4f168ff7c3828ec3b51 (patch)
tree8498573b55254d701dcf569fc675d011fd05557a /src
parentc910a12d9d37f756ca3a2205698eaff91ccb2239 (diff)
downloadingen-afffecae1c567bac1622d4f168ff7c3828ec3b51.tar.gz
ingen-afffecae1c567bac1622d4f168ff7c3828ec3b51.tar.bz2
ingen-afffecae1c567bac1622d4f168ff7c3828ec3b51.zip
Cleanup: Work around clang-tidy bug
For some reason clang-tidy thinks that insert can modify the value of tail_block, so this triggers a null dereference warning. If that were true, it would be true with things swapped around like this as well, but it makes the warning go away at least.
Diffstat (limited to 'src')
-rw-r--r--src/server/events/Connect.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index dda1821b..dd5b32a9 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -114,9 +114,6 @@ Connect::pre_process(PreProcessContext& ctx)
if (tail_block != head_block && tail_block->parent() == head_block->parent()) {
// Connection is between blocks inside a graph, compile graph
- // The tail block is now a dependency (provider) of the head block
- head_block->providers().insert(tail_block);
-
if (!dynamic_cast<internals::BlockDelayNode*>(tail_block)) {
/* Arcs leaving a delay node are ignored for the purposes of
compilation, since the output is from the previous cycle and
@@ -125,6 +122,9 @@ Connect::pre_process(PreProcessContext& ctx)
tail_block->dependants().insert(head_block);
}
+ // The tail block is now a dependency (provider) of the head block
+ head_block->providers().insert(tail_block);
+
if (ctx.must_compile(*_graph)) {
if (!(_compiled_graph = compile(*_engine.maid(), *_graph))) {
head_block->providers().erase(tail_block);