diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index a0326debc0..49b441af31 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -142,7 +142,7 @@ namespace MWGui if (mDragAndDrop->mDraggedFrom != this) { // add item to the player's inventory - MWWorld::InventoryStore& invStore = static_cast(MWWorld::Class::get(mContainer).getContainerStore(mContainer)); + MWWorld::ContainerStore& invStore = MWWorld::Class::get(mContainer).getContainerStore(mContainer); MWWorld::ContainerStoreIterator it = invStore.begin(); int origCount = ptr.getRefData().getCount(); @@ -179,7 +179,7 @@ namespace MWGui std::vector InventoryWindow::getEquippedItems() { - MWWorld::InventoryStore& invStore = static_cast(MWWorld::Class::get(mContainer).getContainerStore(mContainer)); + MWWorld::InventoryStore& invStore = MWWorld::Class::get(mContainer).getInventoryStore(mContainer); std::vector items; @@ -197,7 +197,7 @@ namespace MWGui void InventoryWindow::_unequipItem(MWWorld::Ptr item) { - MWWorld::InventoryStore& invStore = static_cast(MWWorld::Class::get(mContainer).getContainerStore(mContainer)); + MWWorld::InventoryStore& invStore = MWWorld::Class::get(mContainer).getInventoryStore(mContainer); for (int slot=0; slot < MWWorld::InventoryStore::Slots; ++slot) { @@ -231,7 +231,7 @@ namespace MWGui int InventoryWindow::getPlayerGold() { - MWWorld::InventoryStore& invStore = static_cast(MWWorld::Class::get(mContainer).getContainerStore(mContainer)); + MWWorld::InventoryStore& invStore = MWWorld::Class::get(mContainer).getInventoryStore(mContainer); for (MWWorld::ContainerStoreIterator it = invStore.begin(); it != invStore.end(); ++it) diff --git a/apps/openmw/mwgui/tradewindow.cpp b/apps/openmw/mwgui/tradewindow.cpp index 3570ea6a39..60cc06cb86 100644 --- a/apps/openmw/mwgui/tradewindow.cpp +++ b/apps/openmw/mwgui/tradewindow.cpp @@ -268,7 +268,7 @@ namespace MWGui return items; } - MWWorld::InventoryStore& invStore = static_cast(MWWorld::Class::get(mContainer).getContainerStore(mContainer)); + MWWorld::InventoryStore& invStore = MWWorld::Class::get(mContainer).getInventoryStore(mContainer); for (int slot=0; slot < MWWorld::InventoryStore::Slots; ++slot) { @@ -327,7 +327,7 @@ namespace MWGui std::vector TradeWindow::itemsToIgnore() { std::vector items; - MWWorld::InventoryStore& invStore = static_cast(MWWorld::Class::get(mContainer).getContainerStore(mContainer)); + MWWorld::ContainerStore& invStore = MWWorld::Class::get(mContainer).getContainerStore(mContainer); for (MWWorld::ContainerStoreIterator it = invStore.begin(); it != invStore.end(); ++it)