Deprecate a..b based ranges in favour of ..=

This commit is contained in:
gingerBill
2022-06-01 11:08:19 +01:00
parent 487bd3d942
commit ba5f7c4e2a
3 changed files with 5 additions and 4 deletions

View File

@@ -231,16 +231,16 @@ xml_decode_entity :: proc(entity: string) -> (decoded: rune, ok: bool) {
for len(entity) > 0 {
r := entity[0]
switch r {
case '0'..'9':
case '0'..='9':
val *= base
val += int(r - '0')
case 'a'..'f':
case 'a'..='f':
if base == 10 { return -1, false }
val *= base
val += int(r - 'a' + 10)
case 'A'..'F':
case 'A'..='F':
if base == 10 { return -1, false }
val *= base
val += int(r - 'A' + 10)