Replace c style cast with dynamic cast

Nicky 2012-10-22 21:39:48 +02:00
parent 3140e9be74
commit dbb1d3f71d
1 changed files with 4 additions and 1 deletions

View File

@ -2554,7 +2554,10 @@ void LLViewerObject::doUpdateInventory(
LLViewerInventoryItem* old_item = NULL;
if(TASK_INVENTORY_ITEM_KEY == key)
{
old_item = (LLViewerInventoryItem*)getInventoryObject(item->getUUID());
// <FS:ND> Do not use C-Style cast for polymorphic upcasting
// old_item = (LLViewerInventoryItem*)getInventoryObject(item->getUUID());
old_item = dynamic_cast<LLViewerInventoryItem*>(getInventoryObject(item->getUUID()));
// </FS:ND>
}
else if(TASK_INVENTORY_ASSET_KEY == key)
{