diff options
author | lloyd <[email protected]> | 2008-11-11 20:37:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-11 20:37:55 +0000 |
commit | 4a3c0dbd1ce70f571e8b7354e85cd7c06c2100e0 (patch) | |
tree | a23455841c5031fbaa30144d9571b78ea2c7b06f /src/algo_factory/algo_cache.h | |
parent | 7ffcb0d29c9b99e46498d0a8a2e4cf5e100a9d21 (diff) |
Wrap at 80 columns
Diffstat (limited to 'src/algo_factory/algo_cache.h')
-rw-r--r-- | src/algo_factory/algo_cache.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/algo_factory/algo_cache.h b/src/algo_factory/algo_cache.h index a77828718..699078b03 100644 --- a/src/algo_factory/algo_cache.h +++ b/src/algo_factory/algo_cache.h @@ -29,7 +29,9 @@ class Algorithm_Cache Algorithm_Cache(Mutex* m) : mutex(m) {} ~Algorithm_Cache(); private: - typedef typename std::map<std::string, std::map<std::string, T*> >::iterator algorithms_iterator; + typedef typename std::map<std::string, std::map<std::string, T*> >::iterator + algorithms_iterator; + typedef typename std::map<std::string, T*>::iterator provider_iterator; algorithms_iterator find_algorithm(const std::string& algo_spec); @@ -76,7 +78,7 @@ const T* Algorithm_Cache<T>::get(const SCAN_Name& request) const std::string requested_provider = request.provider(); - if(requested_provider != "") // If a specific request, allow that provider or core + if(requested_provider != "") { provider_iterator provider = algo->second.find(requested_provider); @@ -115,8 +117,11 @@ void Algorithm_Cache<T>::add(T* algo, delete algorithms[algo->name()][provider]; algorithms[algo->name()][provider] = algo; - if(algo->name() != requested_name && aliases.find(requested_name) == aliases.end()) + if(algo->name() != requested_name && + aliases.find(requested_name) == aliases.end()) + { aliases[requested_name] = algo->name(); + } } /** |