inline Port.setstate; remove unused network codes

This commit is contained in:
Redo0
2021-05-25 20:37:29 -05:00
parent c62d7340b0
commit 09e65faec4
5 changed files with 18 additions and 32 deletions

View File

@@ -84,7 +84,7 @@ end
function Group.addport(group, port)
if port.group~=nil then error("port already has group") end
port.group = group
Port.setgroup(port, group)
if port.type == PortTypes.output then
if group.out_ports[port] then error("port already in group") end
@@ -112,7 +112,7 @@ end
function Group.removeport(group, port)
if port.group~=group then error("port does not have group") end
port.group = nil
Port.setgroup(port, nil)
if port.type == PortTypes.output then
if not group.out_ports[port] then error("port not in group") end