1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: byte => u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 14:58:56 +03:00
parent b49d873217
commit d4a0d6f73c
221 changed files with 1365 additions and 1365 deletions

View File

@ -39,16 +39,16 @@ pub fn (mut rng PCG32RNG) seed(seed_data []u32) {
// byte returns a uniformly distributed pseudorandom 8-bit unsigned positive `byte`.
[inline]
pub fn (mut rng PCG32RNG) byte() byte {
pub fn (mut rng PCG32RNG) u8() byte {
if rng.bytes_left >= 1 {
rng.bytes_left -= 1
value := byte(rng.buffer)
value := u8(rng.buffer)
rng.buffer >>= 8
return value
}
rng.buffer = rng.u32()
rng.bytes_left = 3
value := byte(rng.buffer)
value := u8(rng.buffer)
rng.buffer >>= 8
return value
}