Skip to content

Commit

Permalink
Use explicit range in for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
rstub committed May 28, 2024
1 parent 845b1f3 commit d5c4912
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inst/include/xoshiro.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ template<>
inline void xoshiro<2>::do_jump(std::array<result_type, 2> JUMP) {
uint64_t s0 = 0;
uint64_t s1 = 0;
for(unsigned int i = 0; i < sizeof JUMP / sizeof JUMP.begin(); i++)
for(int i = 0; i < 2; i++)
for(int b = 0; b < 64; b++) {
if (JUMP[i] & UINT64_C(1) << b) {
s0 ^= s[0];
Expand All @@ -127,7 +127,7 @@ inline void xoshiro<4>::do_jump(std::array<result_type, 4> JUMP) {
uint64_t s1 = 0;
uint64_t s2 = 0;
uint64_t s3 = 0;
for(unsigned int i = 0; i < sizeof JUMP / sizeof JUMP.begin(); i++)
for(int i = 0; i < 4; i++)
for(int b = 0; b < 64; b++) {
if (JUMP[i] & UINT64_C(1) << b) {
s0 ^= s[0];
Expand Down

0 comments on commit d5c4912

Please sign in to comment.