Optimizing some bytes.
parent
3c185aa40f
commit
2604347e8b
|
@ -12,11 +12,10 @@ import (
|
|||
func (mip *AbstractMulticast) AddUniqueAndSort(hier int64) {
|
||||
|
||||
if slices.Contains(mip.HierarchyArray, hier) {
|
||||
log.Println("Element already in the array:", hier)
|
||||
log.Println("Element already in the array: ", hier)
|
||||
} else {
|
||||
mip.HierarchyArray = append(mip.HierarchyArray, hier)
|
||||
log.Println("Here the numbers known:", mip.HierarchyArray)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -132,6 +131,7 @@ func (b *AbstractBridge) WaitAndClean(entity AbstractMulticast) {
|
|||
// svuotare l'array e rifare le elezioni
|
||||
if !isActive(string(brIp.String())) {
|
||||
entity.HierarchyArray = entity.HierarchyArray[:0]
|
||||
entity.HierarchyArray = slices.Clip(entity.HierarchyArray)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue