aboutsummaryrefslogtreecommitdiffstats
path: root/src/algo_factory/algo_factory.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-08-04 12:50:23 +0000
committerlloyd <[email protected]>2010-08-04 12:50:23 +0000
commite19f1554004830e99872c13b8d5fa678b93d586a (patch)
tree51ebc37d2bda7ee4ad9d16f8e0408ac9dd844dd2 /src/algo_factory/algo_factory.cpp
parent5d9eecf1646facfff9b20e9932894fce0d0ff39c (diff)
parent49ebca0d092bcb6a208604f7ac8d1b798f5170fc (diff)
propagate from branch 'net.randombit.botan' (head 717a9d103aa80e6d66c04e3a23cf173aadf56ceb)
to branch 'net.randombit.botan.c++0x' (head c9759e8ebc2f360696a11f2d00fc218d7a8bf744)
Diffstat (limited to 'src/algo_factory/algo_factory.cpp')
-rw-r--r--src/algo_factory/algo_factory.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp
index 6bd66d349..ba981cad0 100644
--- a/src/algo_factory/algo_factory.cpp
+++ b/src/algo_factory/algo_factory.cpp
@@ -87,12 +87,12 @@ const T* factory_prototype(const std::string& algo_spec,
/*
* Setup caches
*/
-Algorithm_Factory::Algorithm_Factory(Mutex_Factory& mf)
+Algorithm_Factory::Algorithm_Factory()
{
- block_cipher_cache = new Algorithm_Cache<BlockCipher>(mf.make());
- stream_cipher_cache = new Algorithm_Cache<StreamCipher>(mf.make());
- hash_cache = new Algorithm_Cache<HashFunction>(mf.make());
- mac_cache = new Algorithm_Cache<MessageAuthenticationCode>(mf.make());
+ block_cipher_cache = new Algorithm_Cache<BlockCipher>();
+ stream_cipher_cache = new Algorithm_Cache<StreamCipher>();
+ hash_cache = new Algorithm_Cache<HashFunction>();
+ mac_cache = new Algorithm_Cache<MessageAuthenticationCode>();
}
/*
@@ -105,7 +105,8 @@ Algorithm_Factory::~Algorithm_Factory()
delete hash_cache;
delete mac_cache;
- std::for_each(engines.begin(), engines.end(), del_fun<Engine>());
+ for(auto i = engines.begin(); i != engines.end(); ++i)
+ delete *i;
}
void Algorithm_Factory::clear_caches()