router: workaround for assertion fail on NODE::Add(unique_ptr<LINE>)

This commit is contained in:
Tomasz Wlostowski 2023-01-09 23:19:23 +01:00
parent dd1a780d1f
commit 213d30cad6
1 changed files with 8 additions and 0 deletions

View File

@ -719,6 +719,14 @@ void NODE::Add( std::unique_ptr< ITEM > aItem, bool aAllowRedundant )
break; break;
case ITEM::LINE_T: case ITEM::LINE_T:
{
//fixme(twl): I don't like unique_ptr in this methods as the router has its own garbage collecting
//mechanism. This particular case is used exclusively in ROUTER::GetUpdatedItems() for
//dumping debug logs. Please don't call Add ( up<LINE> ) otherwise, dragons live here.
LINE *l = static_cast<LINE*>( aItem.get() );
Add( *l );
break;
}
default: default:
assert( false ); assert( false );
} }