From 8a82ff9fe49c4bc6fb534899ff59e2172a9b4e0b Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 11 Oct 2019 08:41:30 -0700 Subject: [PATCH] Revert "dynamic_cast may not be defined during dtor" This reverts commit dd24b2ad75847ea728553d9eba5002551c7b4525. --- src/factory/FieldCreateFactory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/factory/FieldCreateFactory.cpp b/src/factory/FieldCreateFactory.cpp index 9637411..14e34f6 100644 --- a/src/factory/FieldCreateFactory.cpp +++ b/src/factory/FieldCreateFactory.cpp @@ -58,8 +58,9 @@ struct FieldCreate::Helper { std::pair itp(create->cache.equal_range(hash)); for(; itp.first!=itp.second; ++itp.first) { - Field* const cent(itp.first->second); - if(compare(*cent, *ent)) { + Field* cent(itp.first->second); + FLD* centx(dynamic_cast(cent)); + if(centx && compare(*centx, *ent)) { try{ ent = std::tr1::static_pointer_cast(cent->shared_from_this()); return;