diff options
Diffstat (limited to 'src/lib/algo_base/algo_registry.h')
-rw-r--r-- | src/lib/algo_base/algo_registry.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/algo_base/algo_registry.h b/src/lib/algo_base/algo_registry.h index 8f3bebec7..80eff47be 100644 --- a/src/lib/algo_base/algo_registry.h +++ b/src/lib/algo_base/algo_registry.h @@ -34,8 +34,8 @@ class Algo_Registry void add(const std::string& name, const std::string& provider, maker_fn fn) { std::unique_lock<std::mutex> lock(m_mutex); - // TODO: check for duplicated registrations - m_maker_fns[name][provider] = fn; + if(!m_maker_fns[name][provider]) + m_maker_fns[name][provider] = fn; } T* make(const Spec& spec, const std::string& provider = "") |