Optimizing some bytes.

master
Uriel Fanelli 2023-08-13 00:03:49 +02:00
parent 3c185aa40f
commit 2604347e8b
1 changed files with 2 additions and 2 deletions

View File

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