refactor: if-return-else-return to if-return and return
This commit is contained in:
parent
07f39afa0a
commit
e6fe9c8e08
1 changed files with 6 additions and 6 deletions
4
vvin.go
4
vvin.go
|
@ -219,13 +219,13 @@ func toInt(s string, max int) int32 {
|
|||
i = 100
|
||||
}
|
||||
return int32(math.Trunc(float64(max*i) / 100))
|
||||
} else {
|
||||
}
|
||||
|
||||
i, err := strconv.Atoi(s)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return int32(i)
|
||||
}
|
||||
}
|
||||
|
||||
func findFirstTarget(title string, wins []*window, ancestors []int) *window {
|
||||
|
|
Loading…
Reference in a new issue