From d4e862dc4e728fffa88fe68270293b2b971ff359 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 18 Apr 2022 03:47:58 +0200 Subject: [PATCH] pform_attach_discipline(): Avoid signal look-up by name The `pform_attach_discipline()` function creates a signal using `pform_makewire()` and then looks it up by name. `pform_makewire()` now returns the signal, so use that directly and skip the look-up by name. Signed-off-by: Lars-Peter Clausen --- pform_disciplines.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pform_disciplines.cc b/pform_disciplines.cc index c0fd6d074..3e83233ce 100644 --- a/pform_disciplines.cc +++ b/pform_disciplines.cc @@ -195,8 +195,7 @@ void pform_attach_discipline(const struct vlltype&loc, PWire* cur_net = pform_get_wire_in_scope(*cur); if (cur_net == 0) { /* Not declared yet, declare it now. */ - pform_makewire(loc, *cur, NetNet::WIRE, IVL_VT_REAL, 0); - cur_net = pform_get_wire_in_scope(*cur); + cur_net = pform_makewire(loc, *cur, NetNet::WIRE, IVL_VT_REAL, 0); assert(cur_net); }