workaround alpha build problem

pull/2/head
weidai 2003-07-31 01:56:19 +00:00
parent 93d56c76c1
commit 083bd3db7c
1 changed files with 8 additions and 8 deletions

View File

@ -145,16 +145,16 @@ void RandomNumberGenerator::DiscardBytes(unsigned int n)
GenerateByte(); GenerateByte();
} }
class ClassNullRNG : public RandomNumberGenerator
{
public:
std::string AlgorithmName() const {return "NullRNG";}
byte GenerateByte() {throw NotImplemented("NullRNG: NullRNG should only be passed to functions that don't need to generate random bytes");}
};
RandomNumberGenerator & NullRNG() RandomNumberGenerator & NullRNG()
{ {
class NullRNG : public RandomNumberGenerator static ClassNullRNG s_nullRNG;
{
public:
std::string AlgorithmName() const {return "NullRNG";}
byte GenerateByte() {throw NotImplemented("NullRNG: NullRNG should only be passed to functions that don't need to generate random bytes");}
};
static NullRNG s_nullRNG;
return s_nullRNG; return s_nullRNG;
} }