From de8a6ba1b527af2d76d791f9fb6f60f7888267e9 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 20 Jun 2017 12:28:46 +0200 Subject: [PATCH] Fixed: Warnings with clang --HG-- branch : develop --- code/ryzom/client/src/item_group_manager.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/item_group_manager.cpp b/code/ryzom/client/src/item_group_manager.cpp index 97e7160f7..bd94f4231 100644 --- a/code/ryzom/client/src/item_group_manager.cpp +++ b/code/ryzom/client/src/item_group_manager.cpp @@ -742,18 +742,21 @@ std::vector CItemGroupManager::matchingItems(CItemGroup *group, //Not very clean, but no choice, it's ugly time std::vector out; std::string dbPath = toDbPath(inventory); - if(dbPath.empty()) + + if (dbPath.empty()) { nldebug("Inventory type %s not supported", INVENTORIES::toString(inventory).c_str()); return out; } IListSheetBase *pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(dbPath)); + for(uint i=0; i < MAX_BAGINV_ENTRIES; i++) { CDBCtrlSheet *pCS = pList->getSheet(i); SLOT_EQUIPMENT::TSlotEquipment slot; - if(group->contains(pCS, slot)) + + if (group->contains(pCS, slot)) { //Sometimes, index in the list differ from the index in DB, and we need the index in DB, not the one from the list std::string dbPath = pCS->getSheet(); @@ -761,7 +764,12 @@ std::vector CItemGroupManager::matchingItems(CItemGroup *group, std::string indexS = dbPath.substr(found+1); uint32 index; NLMISC::fromString(indexS, index); - if(i != index) nldebug("Index from list is %d, where index from DB is %d", i, index); + + if (i != index) + { + nldebug("Index from list is %d, where index from DB is %d", i, index); + } + out.push_back(CInventoryItem(pCS, inventory, index, slot)); } }