From 4bc4ca775cfd36b6fdd97dbaa071dc79a3c947ec Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 1 Nov 2012 15:11:13 +0100 Subject: [PATCH] Issue #432: fixed MWWorld::ContainerStore::clear --- apps/openmw/mwworld/containerstore.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/apps/openmw/mwworld/containerstore.cpp b/apps/openmw/mwworld/containerstore.cpp index 3bc06b581..5c4dd03a4 100644 --- a/apps/openmw/mwworld/containerstore.cpp +++ b/apps/openmw/mwworld/containerstore.cpp @@ -167,18 +167,8 @@ void MWWorld::ContainerStore::fill (const ESM::InventoryList& items, const ESMS: void MWWorld::ContainerStore::clear() { - potions.list.clear(); - appas.list.clear(); - armors.list.clear(); - books.list.clear(); - clothes.list.clear(); - ingreds.list.clear(); - lights.list.clear(); - lockpicks.list.clear(); - miscItems.list.clear(); - probes.list.clear(); - repairs.list.clear(); - weapons.list.clear(); + for (ContainerStoreIterator iter (begin()); iter!=end(); ++iter) + iter->getRefData().setCount (0); flagAsModified(); }