fix random.cpp build errors on non C99 compilers
This commit is contained in:
@@ -5,7 +5,7 @@ namespace libtorrent
|
||||
|
||||
namespace
|
||||
{
|
||||
uint32_t x = 123456789;
|
||||
boost::uint32_t x = 123456789;
|
||||
}
|
||||
|
||||
void random_seed(boost::uint32_t v)
|
||||
@@ -17,10 +17,10 @@ namespace libtorrent
|
||||
// see: http://en.wikipedia.org/wiki/Xorshift
|
||||
boost::uint32_t random()
|
||||
{
|
||||
static uint32_t y = 362436069;
|
||||
static uint32_t z = 521288629;
|
||||
static uint32_t w = 88675123;
|
||||
uint32_t t;
|
||||
static boost::uint32_t y = 362436069;
|
||||
static boost::uint32_t z = 521288629;
|
||||
static boost::uint32_t w = 88675123;
|
||||
boost::uint32_t t;
|
||||
|
||||
t = x ^ (x << 11);
|
||||
x = y; y = z; z = w;
|
||||
|
Reference in New Issue
Block a user