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

pull/11955/head
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
1 changed files with 6 additions and 6 deletions

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) }
}