Skip to content

Commit

Permalink
Add @(require_results) to random generator
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed Feb 24, 2025
1 parent c45f397 commit ef016d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions base/runtime/random_generator.odin
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ default_random_generator_proc :: proc(data: rawptr, mode: Random_Generator_Mode,
}
}

@(require_results)
default_random_generator :: proc "contextless" (state: ^Default_Random_State = nil) -> Random_Generator {
return {
procedure = default_random_generator_proc,
Expand Down
1 change: 0 additions & 1 deletion core/math/rand/rand.odin
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ default_random_generator :: runtime.default_random_generator
@(require_results)
create :: proc(seed: u64) -> (state: Default_Random_State) {
seed := seed
runtime.default_random_generator(&state)
runtime.default_random_generator_proc(&state, .Reset, ([^]byte)(&seed)[:size_of(seed)])
return
}
Expand Down

0 comments on commit ef016d9

Please sign in to comment.