mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
builtin: fix warnings for ./v doc -m -f html vlib/builtin/
This commit is contained in:
parent
2c7b42030a
commit
ca620f4965
1 changed files with 6 additions and 3 deletions
|
@ -102,11 +102,13 @@ pub fn i64_tos(buf &u8, len int, n0 i64, base int) string {
|
|||
n = -n
|
||||
}
|
||||
|
||||
b[i--] = 0
|
||||
b[i] = 0
|
||||
i--
|
||||
|
||||
for {
|
||||
c := (n % base) + 48
|
||||
b[i--] = if c > 57 { c + 7 } else { c }
|
||||
b[i] = if c > 57 { c + 7 } else { c }
|
||||
i--
|
||||
if i < 0 {
|
||||
panic('buffer to small')
|
||||
}
|
||||
|
@ -119,7 +121,8 @@ pub fn i64_tos(buf &u8, len int, n0 i64, base int) string {
|
|||
if i < 0 {
|
||||
panic('buffer to small')
|
||||
}
|
||||
b[i--] = 45
|
||||
b[i] = 45
|
||||
i--
|
||||
}
|
||||
offset := i + 1
|
||||
b.str = b.str + offset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue