From 4b5ba5dd18132edad0d20f68111adbef1b8996cd Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Wed, 24 Oct 2012 18:20:07 -0500 Subject: [PATCH] Minor memory usage improvment --- WeightsWatcher.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua index bc8f2a4..2610696 100644 --- a/WeightsWatcher.lua +++ b/WeightsWatcher.lua @@ -633,6 +633,7 @@ local function colorizeDifferences(difference) end end +local weapons = {"MainHandSlot", "SecondaryHandSlot"} local slotConversion = { [ww_localizedSlotNames["head"]] = "HeadSlot", [ww_localizedSlotNames["shoulder"]] = "ShoulderSlot", @@ -642,18 +643,18 @@ local slotConversion = { [ww_localizedSlotNames["waist"]] = "WaistSlot", [ww_localizedSlotNames["legs"]] = "LegsSlot", [ww_localizedSlotNames["feet"]] = "FeetSlot", - [ww_localizedSlotNames["main hand"]] = {"MainHandSlot", "SecondaryHandSlot"}, - [ww_localizedSlotNames["off hand"]] = {"MainHandSlot", "SecondaryHandSlot"}, - [ww_localizedSlotNames["one-hand"]] = {"MainHandSlot", "SecondaryHandSlot"}, - [ww_localizedSlotNames["two-hand"]] = {"MainHandSlot", "SecondaryHandSlot"}, - [ww_localizedSlotNames["ranged"]] = {"MainHandSlot", "SecondaryHandSlot"}, + [ww_localizedSlotNames["main hand"]] = weapons, + [ww_localizedSlotNames["off hand"]] = weapons, + [ww_localizedSlotNames["one-hand"]] = weapons, + [ww_localizedSlotNames["two-hand"]] = weapons, + [ww_localizedSlotNames["ranged"]] = weapons, [ww_localizedSlotNames["neck"]] = "NeckSlot", [ww_localizedSlotNames["back"]] = "BackSlot", [ww_localizedSlotNames["shirt"]] = "ShirtSlot", [ww_localizedSlotNames["tabard"]] = "TabardSlot", [ww_localizedSlotNames["finger"]] = {"Finger0Slot", "Finger1Slot"}, [ww_localizedSlotNames["trinket"]] = {"Trinket0Slot", "Trinket1Slot"}, - [ww_localizedSlotNames["held in off-hand"]] = {"MainHandSlot", "SecondaryHandSlot"}, + [ww_localizedSlotNames["held in off-hand"]] = weapons, } local function getCompareInfo(ttname, bareLink, bareItemInfo) -- 1.7.9.5