diff --git a/comsoc/Approval.go b/comsoc/Approval.go index 1faee80bdc96540766ecb513292dd5eeb0c35af5..075f074e6145c13bb90dc9df608015be9167467e 100644 --- a/comsoc/Approval.go +++ b/comsoc/Approval.go @@ -8,6 +8,12 @@ func ApprovalSWF(p Profile, thresholds []int) (count Count, err error) { if err != nil { return nil, err } + //initialisation de la map : comptes à 0 + count = make(Count) + for _,alt := range p[0]{ + count[alt]=0 + } + //actualisation du compte à l'aide du scrutin for index, alt := range p { for i := 0; i < thresholds[index]; i++ { count[alt[i]] += 1