From 34335a3eb5e92d692363cf1cbc170568f319bca0 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Fri, 13 May 2022 18:47:11 -0700 Subject: Clean up variable names somewhat. --- lace.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lace.rb b/lace.rb index b5aebf1..de56c2f 100644 --- a/lace.rb +++ b/lace.rb @@ -103,21 +103,21 @@ module Lace end def merge_nets(a, b) - da = definitive_net(a) - db = definitive_net(b) - return da if da.object_id == db.object_id - into = @nets[[da.object_id, db.object_id].min] - if da.name - raise "Nets #{into.name} and #{da.name} merged!" if into.name and into.name != da.name - into.name = da.name + a = definitive_net(a) + b = definitive_net(b) + return a if a.object_id == b.object_id + into = @nets[[a.object_id, b.object_id].min] + if a.name + raise "Nets #{into.name} and #{a.name} merged!" if into.name and into.name != a.name + into.name = a.name end - if db.name - raise "Nets #{into.name} and #{db.name} merged!" if into.name and into.name != db.name - into.name = db.name + if b.name + raise "Nets #{into.name} and #{b.name} merged!" if into.name and into.name != b.name + into.name = b.name end @nets.each do | id, n | - dn = definitive_net(n) - if dn.object_id != into.object_id and (dn.object_id == da.object_id or dn.object_id == db.object_id) + n = definitive_net(n) + if n.object_id != into.object_id and (n.object_id == a.object_id or n.object_id == b.object_id) @nets[id] = into end end -- cgit v1.2.3