From df8e095c83ac2655cee0082d3f06c8419fc29e24 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 22 May 2014 23:27:54 +0200 Subject: [PATCH] Small cleanup --- apps/openmw/mwdialogue/filter.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/apps/openmw/mwdialogue/filter.cpp b/apps/openmw/mwdialogue/filter.cpp index 5bdf80593b..863a0f2ffc 100644 --- a/apps/openmw/mwdialogue/filter.cpp +++ b/apps/openmw/mwdialogue/filter.cpp @@ -264,15 +264,7 @@ int MWDialogue::Filter::getSelectStructInteger (const SelectWrapper& select) con { MWWorld::ContainerStore& store = MWWorld::Class::get (player).getContainerStore (player); - int sum = 0; - - std::string name = select.getName(); - - for (MWWorld::ContainerStoreIterator iter (store.begin()); iter!=store.end(); ++iter) - if (Misc::StringUtils::ciEqual(iter->getCellRef().mRefID, name)) - sum += iter->getRefData().getCount(); - - return sum; + return store.count(select.getName()); } case SelectWrapper::Function_Dead: