stop using pairs instead of index loops, please, it's so much slower

This commit is contained in:
niczkx
2012-07-20 20:56:08 +02:00
parent 483487ab09
commit 8a49d09b75
12 changed files with 253 additions and 95 deletions

View File

@@ -62,7 +62,8 @@ local function initMarketItems()
-- populate all market items
marketItems = {}
local types = g_things.findThingTypeByAttr(ThingAttrMarket)
for k,t in pairs(types) do
for idx = 1, #types do
local t = types[idx]
local newItem = Item.create(t:getId())
if newItem then
local item = {
@@ -352,4 +353,4 @@ function Market.onItemBoxChecked(widget)
if widget:isChecked() then
Market.updateSelectedItem(widget.item)
end
end
end