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 <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-04-18 03:47:58 +02:00
parent 254e9dc094
commit d4e862dc4e
1 changed files with 1 additions and 2 deletions

View File

@ -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);
}