Revert "dynamic_cast may not be defined during dtor"

This reverts commit dd24b2ad75.
This commit is contained in:
Michael Davidsaver
2019-10-11 08:41:30 -07:00
parent dd24b2ad75
commit 8a82ff9fe4

View File

@@ -58,8 +58,9 @@ struct FieldCreate::Helper {
std::pair<cache_t::iterator, cache_t::iterator> 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<FLD*>(cent));
if(centx && compare(*centx, *ent)) {
try{
ent = std::tr1::static_pointer_cast<FLD>(cent->shared_from_this());
return;