mirror of
https://github.com/robertkrimen/otto.git
synced 2025-12-24 12:58:05 +08:00
fix: uint<0 comparisons (#421)
Remove impossible conditions for uint comparisons.
This commit is contained in:
@@ -331,24 +331,18 @@ func toIntSign(value Value) int {
|
||||
case uint8:
|
||||
if uint8(value) > 0 {
|
||||
return 1
|
||||
} else if uint8(value) < 0 {
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
case uint16:
|
||||
if uint16(value) > 0 {
|
||||
return 1
|
||||
} else if uint16(value) < 0 {
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
case uint32:
|
||||
if uint32(value) > 0 {
|
||||
return 1
|
||||
} else if uint32(value) < 0 {
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user