Replace c style cast with dynamic cast
parent
3140e9be74
commit
dbb1d3f71d
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue