diff options
Diffstat (limited to 'core/math/disjoint_set.h')
-rw-r--r-- | core/math/disjoint_set.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/math/disjoint_set.h b/core/math/disjoint_set.h index 4d93a0035b..198f46e111 100644 --- a/core/math/disjoint_set.h +++ b/core/math/disjoint_set.h @@ -109,8 +109,9 @@ void DisjointSet<T, C, AL>::create_union(T a, T b) { Element *y_root = get_parent(y); // Already in the same set - if (x_root == y_root) + if (x_root == y_root) { return; + } // Not in the same set, merge if (x_root->rank < y_root->rank) { |