Remove unnecessary static from reference to singleton

pull/392/head
jan-dominik.blome 2017-03-15 12:19:31 +01:00
parent 46c9cc725c
commit fcdf293356
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ void NonblockingRng::GenerateBlock(byte *output, size_t size)
{ {
#ifdef CRYPTOPP_WIN32_AVAILABLE #ifdef CRYPTOPP_WIN32_AVAILABLE
// Acquiring a provider is expensive. Do it once and retain the reference. // Acquiring a provider is expensive. Do it once and retain the reference.
static const MicrosoftCryptoProvider &hProvider = Singleton<MicrosoftCryptoProvider>().Ref(); const MicrosoftCryptoProvider &hProvider = Singleton<MicrosoftCryptoProvider>().Ref();
# if defined(USE_MS_CRYPTOAPI) # if defined(USE_MS_CRYPTOAPI)
if (!CryptGenRandom(hProvider.GetProviderHandle(), (DWORD)size, output)) if (!CryptGenRandom(hProvider.GetProviderHandle(), (DWORD)size, output))
throw OS_RNG_Err("CryptGenRandom"); throw OS_RNG_Err("CryptGenRandom");