From bf7116520bc723980edb1120eaa66455a4c66ca5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 14 May 2012 05:11:04 +0000 Subject: Tidy. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4410 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/events/Connect.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/server/events/Connect.cpp') diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index edea8f15..8fec67f6 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -85,8 +85,8 @@ Connect::pre_process() } if (src_node->parent() != dst_node->parent() - && src_node != dst_node->parent() - && src_node->parent() != dst_node) { + && src_node != dst_node->parent() + && src_node->parent() != dst_node) { _status = PARENT_DIFFERS; Event::pre_process(); return; @@ -98,20 +98,19 @@ Connect::pre_process() return; } - // Edge to a patch port from inside the patch if (src_node->parent_patch() != dst_node->parent_patch()) { + // Edge to a patch port from inside the patch assert(src_node->parent() == dst_node || dst_node->parent() == src_node); - if (src_node->parent() == dst_node) + if (src_node->parent() == dst_node) { _patch = dynamic_cast(dst_node); - else + } else { _patch = dynamic_cast(src_node); - - // Edge from a patch input to a patch output (pass through) + } } else if (src_node == dst_node && dynamic_cast(src_node)) { + // Edge from a patch input to a patch output (pass through) _patch = dynamic_cast(src_node); - - // Normal edge between nodes with the same parent } else { + // Normal edge between nodes with the same parent _patch = src_node->parent_patch(); } -- cgit v1.2.1