Skip to content

Commit

Permalink
Use unsigned loop index
Browse files Browse the repository at this point in the history
  • Loading branch information
rstub committed Jun 8, 2018
1 parent 9c85053 commit 98191e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inst/include/xoshiro.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ void xoroshiro128plus::jump() {

uint64_t s0 = 0;
uint64_t s1 = 0;
for(int i = 0; i < sizeof JUMP / sizeof *JUMP; i++)
for(int b = 0; b < 64; b++) {
for(unsigned int i = 0; i < sizeof JUMP / sizeof *JUMP; i++)
for(unsigned int b = 0; b < 64; b++) {
if (JUMP[i] & UINT64_C(1) << b) {
s0 ^= state[0];
s1 ^= state[1];
Expand Down Expand Up @@ -169,8 +169,8 @@ void xoshiro256plus::jump() {
uint64_t s1 = 0;
uint64_t s2 = 0;
uint64_t s3 = 0;
for(int i = 0; i < sizeof JUMP / sizeof *JUMP; i++)
for(int b = 0; b < 64; b++) {
for(unsigned int i = 0; i < sizeof JUMP / sizeof *JUMP; i++)
for(unsigned int b = 0; b < 64; b++) {
if (JUMP[i] & UINT64_C(1) << b) {
s0 ^= state[0];
s1 ^= state[1];
Expand Down

0 comments on commit 98191e2

Please sign in to comment.