diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-10-11 15:04:23 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-10-11 15:04:23 +0200 |
commit | 5ad3d86b6e2c39de7465186ec8702053a82b6152 (patch) | |
tree | 260caa74def1712bf1d0811789a2205e8c55e2fc /src | |
parent | 90a0bd4962ae21413456b27e55382ba5223e1c10 (diff) | |
parent | 9c7d0f544b7a4dec54e9a75ea45b985ad7fac756 (diff) | |
download | astra-5ad3d86b6e2c39de7465186ec8702053a82b6152.tar.gz astra-5ad3d86b6e2c39de7465186ec8702053a82b6152.tar.bz2 astra-5ad3d86b6e2c39de7465186ec8702053a82b6152.tar.xz astra-5ad3d86b6e2c39de7465186ec8702053a82b6152.zip |
Merge branch 'master' into parallel_vec
Diffstat (limited to 'src')
-rw-r--r-- | src/AsyncAlgorithm.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/AsyncAlgorithm.cpp b/src/AsyncAlgorithm.cpp index 54083a3..a53fb00 100644 --- a/src/AsyncAlgorithm.cpp +++ b/src/AsyncAlgorithm.cpp @@ -72,11 +72,13 @@ bool CAsyncAlgorithm::initialize(const Config& _cfg) m_pAlg = 0; m_bDone = false; - m_pAlg = CAlgorithmFactory::getSingleton().create(_cfg); - if (m_pAlg && !m_pAlg->isInitialized()) { - if (m_bAutoFree) - delete m_pAlg; - m_pAlg = 0; + m_pAlg = CAlgorithmFactory::getSingleton().create(_cfg.self.getAttribute("type")); + if (m_pAlg) { + if (!m_pAlg->initialize(_cfg)) { + if (m_bAutoFree) + delete m_pAlg; + m_pAlg = 0; + } } m_bInitialized = (m_pAlg != 0); m_bAutoFree = true; |