remove old code

pull/2/head
weidai 2006-12-14 12:53:44 +00:00
parent 492b77b449
commit 03f54a866e
1 changed files with 1 additions and 6 deletions

View File

@ -45,14 +45,9 @@ public:
static unsigned int StaticGetDefaultRounds(size_t keylength) {return DEFAULT_ROUNDS;} static unsigned int StaticGetDefaultRounds(size_t keylength) {return DEFAULT_ROUNDS;}
protected: protected:
static inline void AssertValidRounds(unsigned int rounds)
{
assert(rounds >= (unsigned int)MIN_ROUNDS && rounds <= (unsigned int)MAX_ROUNDS);
}
inline void ThrowIfInvalidRounds(int rounds, const Algorithm *alg) inline void ThrowIfInvalidRounds(int rounds, const Algorithm *alg)
{ {
if (rounds < (int)MIN_ROUNDS || rounds > (int)MAX_ROUNDS) if (rounds < MIN_ROUNDS || rounds > MAX_ROUNDS)
throw InvalidRounds(alg->AlgorithmName(), rounds); throw InvalidRounds(alg->AlgorithmName(), rounds);
} }