From 71d31c126730e13b00cc87806564f9ed40b10ab3 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Fri, 27 Feb 2015 11:48:14 +0000 Subject: [PATCH] minor optimization to reset() methods in smt::ketnel and smt::quantifier_manager Signed-off-by: Nuno Lopes --- src/smt/smt_kernel.cpp | 4 ++-- src/smt/smt_quantifier.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/smt/smt_kernel.cpp b/src/smt/smt_kernel.cpp index d78b82cc6..a4e97380b 100644 --- a/src/smt/smt_kernel.cpp +++ b/src/smt/smt_kernel.cpp @@ -236,8 +236,8 @@ namespace smt { params_ref ps = m_imp->params(); #pragma omp critical (smt_kernel) { - dealloc(m_imp); - m_imp = alloc(imp, _m, fps, ps); + m_imp->~imp(); + m_imp = new (m_imp) imp(_m, fps, ps); } } diff --git a/src/smt/smt_quantifier.cpp b/src/smt/smt_quantifier.cpp index b76fb6c74..f824cb3f1 100644 --- a/src/smt/smt_quantifier.cpp +++ b/src/smt/smt_quantifier.cpp @@ -361,8 +361,8 @@ namespace smt { context & ctx = m_imp->m_context; smt_params & p = m_imp->m_params; quantifier_manager_plugin * plugin = m_imp->m_plugin->mk_fresh(); - dealloc(m_imp); - m_imp = alloc(imp, *this, ctx, p, plugin); + m_imp->~imp(); + m_imp = new (m_imp) imp(*this, ctx, p, plugin); plugin->set_manager(*this); } }