lemon/random.h
changeset 1328 d51126dc39fa
parent 631 33c6b6e755cd
child 1338 0998f70d0b2d
child 1340 f70f688d9ef9
     1.1 --- a/lemon/random.h	Thu Apr 02 12:57:18 2015 +0200
     1.2 +++ b/lemon/random.h	Thu Apr 02 13:36:16 2015 +0200
     1.3 @@ -199,7 +199,7 @@
     1.4  
     1.5          initState(init);
     1.6  
     1.7 -        num = length > end - begin ? length : end - begin;
     1.8 +        num = static_cast<int>(length > end - begin ? length : end - begin);
     1.9          while (num--) {
    1.10            curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul1))
    1.11              + *it + cnt;
    1.12 @@ -213,7 +213,7 @@
    1.13            --curr;
    1.14          }
    1.15  
    1.16 -        num = length - 1; cnt = length - (curr - state) - 1;
    1.17 +        num = length - 1; cnt = static_cast<int>(length - (curr - state) - 1);
    1.18          while (num--) {
    1.19            curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul2))
    1.20              - cnt;