1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/other-licenses/7zstub/src/Common/Random.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,17 @@ 1.4 +// Common/Random.cpp 1.5 + 1.6 +#include "StdAfx.h" 1.7 + 1.8 +#include <time.h> 1.9 +#include <stdlib.h> 1.10 + 1.11 +#include "Common/Random.h" 1.12 + 1.13 +void CRandom::Init(unsigned int seed) 1.14 + { srand(seed); } 1.15 + 1.16 +void CRandom::Init() 1.17 + { Init((unsigned int)time(NULL)); } 1.18 + 1.19 +int CRandom::Generate() const 1.20 + { return rand(); }