Skip to content
Snippets Groups Projects
Commit 937b399f authored by Gabrielle Van De Vijver's avatar Gabrielle Van De Vijver
Browse files

initialisation comptes pour approval

parent f4512e0e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment