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

ci: work around a failing g++ compilation (order of methods in an interface dispatching table matters for C++ compilers)

This commit is contained in:
Delyan Angelov 2021-09-23 14:08:43 +03:00
parent ece5fa183c
commit afc3531945
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -22,12 +22,6 @@ mut:
extra u32 extra u32
} }
// free should be called when the generator is no longer needed
[unsafe]
pub fn (mut rng WyRandRNG) free() {
unsafe { free(rng) }
}
// seed sets the seed, needs only two `u32`s in little-endian format as [lower, higher]. // seed sets the seed, needs only two `u32`s in little-endian format as [lower, higher].
pub fn (mut rng WyRandRNG) seed(seed_data []u32) { pub fn (mut rng WyRandRNG) seed(seed_data []u32) {
if seed_data.len != 2 { if seed_data.len != 2 {
@ -256,3 +250,9 @@ pub fn (mut rng WyRandRNG) f64_in_range(min f64, max f64) f64 {
} }
return min + rng.f64n(max - min) return min + rng.f64n(max - min)
} }
// free should be called when the generator is no longer needed
[unsafe]
pub fn (mut rng WyRandRNG) free() {
unsafe { free(rng) }
}