aboutsummaryrefslogtreecommitdiffstats
path: root/src/algo_factory
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 20:44:34 +0000
committerlloyd <[email protected]>2012-05-18 20:44:34 +0000
commit8383b0b503c812e45f2780217b048a19a8946853 (patch)
tree939403bad80ee2b1e13b69c82adc316422a9c7d6 /src/algo_factory
parentc691561f3198f481c13457433efbccc1c9fcd898 (diff)
Replace 0 and NULL pointer constants with nullptr. Also fix an old
style cast in secmem.h
Diffstat (limited to 'src/algo_factory')
-rw-r--r--src/algo_factory/algo_cache.h6
-rw-r--r--src/algo_factory/algo_factory.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/algo_factory/algo_cache.h b/src/algo_factory/algo_cache.h
index 3a792c994..11a5580fb 100644
--- a/src/algo_factory/algo_cache.h
+++ b/src/algo_factory/algo_cache.h
@@ -112,7 +112,7 @@ const T* Algorithm_Cache<T>::get(const std::string& algo_spec,
auto algo = find_algorithm(algo_spec);
if(algo == algorithms.end()) // algo not found at all (no providers)
- return 0;
+ return nullptr;
// If a provider is requested specifically, return it or fail entirely
if(requested_provider != "")
@@ -120,10 +120,10 @@ const T* Algorithm_Cache<T>::get(const std::string& algo_spec,
auto prov = algo->second.find(requested_provider);
if(prov != algo->second.end())
return prov->second;
- return 0;
+ return nullptr;
}
- const T* prototype = 0;
+ const T* prototype = nullptr;
std::string prototype_provider;
size_t prototype_prov_weight = 0;
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp
index 9e4f78569..1683648bd 100644
--- a/src/algo_factory/algo_factory.cpp
+++ b/src/algo_factory/algo_factory.cpp
@@ -30,7 +30,7 @@ template<typename T>
T* engine_get_algo(Engine*,
const SCAN_Name&,
Algorithm_Factory&)
- { return 0; }
+ { return nullptr; }
template<>
BlockCipher* engine_get_algo(Engine* engine,
@@ -75,7 +75,7 @@ const T* factory_prototype(const std::string& algo_spec,
SCAN_Name scan_name(algo_spec);
if(scan_name.cipher_mode() != "")
- return 0;
+ return nullptr;
for(size_t i = 0; i != engines.size(); ++i)
{
@@ -157,7 +157,7 @@ void Algorithm_Factory::set_preferred_provider(const std::string& algo_spec,
Engine* Algorithm_Factory::get_engine_n(size_t n) const
{
if(n >= engines.size())
- return 0;
+ return nullptr;
return engines[n];
}