Quantcast

twipe --> table.wipe

James D. Callahan III [07-09-10 - 22:58]
twipe --> table.wipe
Filename
Frame.lua
Scanner.lua
core.lua
diff --git a/Frame.lua b/Frame.lua
index 511ef32..e7a4fb0 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -33,7 +33,6 @@ local select = _G.select
 local type = _G.type

 local table = _G.table
-local twipe = table.wipe

 local ipairs, pairs = _G.ipairs, _G.pairs

@@ -170,7 +169,7 @@ do
 	-- Cleans the table and stores it in the cache
 	function ReleaseTable(tbl)
 		if not tbl then return end
-		twipe(tbl)
+		table.wipe(tbl)
 		table.insert(table_cache, tbl)
 	end
 end	-- do block
@@ -380,7 +379,7 @@ do

 		local sort_func = RECIPE_SORT_FUNCS[(skill_view and "Skill" or "Name")..sort_type] or Sort_NameAsc

-		twipe(sorted_recipes)
+		table.wipe(sorted_recipes)

 		for n, v in pairs(recipe_list) do
 			table.insert(sorted_recipes, n)
@@ -1091,7 +1090,7 @@ do
 		local recipe_count = 0
 		local insert_index = 1

-		twipe(recipe_registry)
+		table.wipe(recipe_registry)

 		if not sorted_acquires then
 			-- Sorting function: Only used once and then thrown away.
@@ -1157,7 +1156,7 @@ do
 		local recipe_count = 0
 		local insert_index = 1

-		twipe(recipe_registry)
+		table.wipe(recipe_registry)

 		if not sorted_locations then
 			-- Sorting function: Only used once and then thrown away.
@@ -2458,7 +2457,7 @@ do
 		for i = 1, #self.entries do
 			ReleaseTable(self.entries[i])
 		end
-		twipe(self.entries)
+		table.wipe(self.entries)

 		addon:UpdateFilters(MainPanel.is_linked)

@@ -3234,7 +3233,7 @@ local function SelectName(cell, arg, button)
 			tskl_list[click_info.realm] = nil
 		end
 		local anchor = click_info.anchor
-		twipe(click_info)
+		table.wipe(click_info)
 		click_info.anchor = anchor
 		GenerateClickableTT()
 		return
@@ -4133,14 +4132,14 @@ local function InitializeFrame()
 					 if clicktip then
 						 if not click_info.modified then
 							 clicktip = QTip:Release(clicktip)
-							 twipe(click_info)
+							 table.wipe(click_info)
 						 else
-							 twipe(click_info)
+							 table.wipe(click_info)
 							 GenerateClickableTT(this)
 						 end
 					 else
 						 clicktip = QTip:Acquire("ARL_Clickable", 1, "CENTER")
-						 twipe(click_info)
+						 table.wipe(click_info)

 						 if _G.TipTac and _G.TipTac.AddModifiedTip then
 							 _G.TipTac:AddModifiedTip(clicktip, true)
@@ -4151,7 +4150,7 @@ local function InitializeFrame()
 	ARL_MiscAltBtn:SetScript("OnHide",
 				 function(this, button)
 					 clicktip = QTip:Release(clicktip)
-					 twipe(click_info)
+					 table.wipe(click_info)
 				 end)

 	-------------------------------------------------------------------------------
diff --git a/Scanner.lua b/Scanner.lua
index 13d9b8f..9945d50 100644
--- a/Scanner.lua
+++ b/Scanner.lua
@@ -20,7 +20,7 @@ This source code is released under All Rights Reserved.
 local _G = getfenv(0)

 local table = _G.table
-local tconcat, tinsert, tsort, twipe = table.concat, table.insert, table.sort, table.wipe
+local tconcat, tinsert, tsort = table.concat, table.insert, table.sort

 local string = _G.string

@@ -571,7 +571,7 @@ do
 			addon:Print(L["DATAMINER_NODB_ERROR"])
 			return
 		end
-		twipe(reverse_lookup)
+		table.wipe(reverse_lookup)

 		for i in pairs(recipe_list) do
 			--if t[recipe_list[i].name] then addon:Print("Dupe: " .. i) end
@@ -618,7 +618,7 @@ do
 		SetTrainerServiceTypeFilter("unavailable", 1)
 		SetTrainerServiceTypeFilter("used", 1)

-		twipe(info)
+		table.wipe(info)

 		-- Get the skill levels from the trainer
 		for i = 1, GetNumTrainerServices(), 1 do
@@ -632,7 +632,7 @@ do
 		end
 		local found = false

-		twipe(output)
+		table.wipe(output)

 		for i in pairs(recipe_list) do
 			local i_name = recipe_list[i].name
@@ -696,16 +696,16 @@ do
 		if GetNumTrainerServices() == 0 then
 			self:Print("Warning: Trainer is bugged, reporting 0 trainer items.")
 		end
-		twipe(info)
+		table.wipe(info)

 		-- Get all the names of recipes from the trainer
 		for i = 1, GetNumTrainerServices(), 1 do
 			local name = GetTrainerServiceInfo(i)
 			info[name] = true
 		end
-		twipe(teach)
-		twipe(noteach)
-		twipe(output)
+		table.wipe(teach)
+		table.wipe(noteach)
+		table.wipe(output)

 		-- Dump out trainer info
 		tinsert(output, L["DATAMINER_TRAINER_INFO"]:format(targetname, targetID))
@@ -844,7 +844,7 @@ do

 	local function SortRecipeList()
 		local sorted_recipes = addon.sorted_recipes
-		twipe(sorted_recipes)
+		table.wipe(sorted_recipes)

 		for n, v in pairs(recipe_list) do
 			tinsert(sorted_recipes, n)
@@ -859,7 +859,7 @@ do
 			addon:Print(L["DATAMINER_NODB_ERROR"])
 			return
 		end
-		twipe(recipe_list)
+		table.wipe(recipe_list)

 		if prof_name == private.professions["Smelting"]:lower() then
 			prof_name = private.mining_name:lower()
@@ -873,7 +873,7 @@ do
 			end
 		end
 		SortRecipeList()
-		twipe(output)
+		table.wipe(output)

 		-- Parse the entire recipe database
 		for index, id in ipairs(addon.sorted_recipes) do
@@ -1031,7 +1031,7 @@ do
 			addon:Print(L["DATAMINE_NODB_ERROR"])
 			return
 		end
-		twipe(recipe_list)
+		table.wipe(recipe_list)

 		if prof_name == private.professions["Smelting"]:lower() then
 			prof_name = private.mining_name:lower()
@@ -1044,7 +1044,7 @@ do
 			end
 		end
 		SortRecipeList()
-		twipe(output)
+		table.wipe(output)

 		for index, id in ipairs(addon.sorted_recipes) do
 			RecipeDump(id, false)
@@ -1053,7 +1053,7 @@ do
 	end

 	function addon:DumpRecipe(id_num)
-		twipe(output)
+		table.wipe(output)
 		RecipeDump(id_num, true)
 		addon:DisplayTextDump(nil, nil, tconcat(output, "\n"))
 	end
@@ -1139,7 +1139,7 @@ do
 		local targetID = tonumber(string.sub(UnitGUID("target"), -12, -7), 16)		-- Get the NPC ID
 		local added = false

-		twipe(output)
+		table.wipe(output)

 		tinsert(output, "Vendor Name: "..targetname.." NPC ID: "..targetID)
 		-- Parse all the items on the merchant
@@ -1229,7 +1229,7 @@ do
 			self:Print(L["DATAMINER_NODB_ERROR"])
 			return
 		end
-		twipe(output)
+		table.wipe(output)

 		-- Parse the entire recipe database
 		for i in pairs(recipe_list) do
@@ -1339,7 +1339,7 @@ do
 		local recipe_name = recipe.name
 		local game_vers = private.game_versions[recipe.genesis]

-		twipe(output)
+		table.wipe(output)

 		if not game_vers then
 			tinsert(output, "No expansion information: " .. tostring(spell_id) .. " " .. recipe_name)
@@ -1763,9 +1763,9 @@ do
 		local FS = private.filter_strings
 		local flag_format = "F.%s"

-		twipe(missing_flags)
-		twipe(extra_flags)
-		twipe(output)
+		table.wipe(missing_flags)
+		table.wipe(extra_flags)
+		table.wipe(output)

 		-- If we're a vendor scan,  do some extra checks
 		if scan_data.is_vendor then
diff --git a/core.lua b/core.lua
index 35ec778..16d605f 100644
--- a/core.lua
+++ b/core.lua
@@ -29,7 +29,7 @@ local pairs, ipairs = _G.pairs, _G.ipairs
 local select = _G.select

 local table = _G.table
-local twipe = table.wipe
+
 local tconcat = table.concat
 local tinsert = table.insert

@@ -170,7 +170,7 @@ do
 	local output = {}

 	function addon:DumpMembers(match)
-		twipe(output)
+		table.wipe(output)
 		tinsert(output, "Addon Object members.\n")

 		local count = 0
@@ -1871,7 +1871,7 @@ do
 		-------------------------------------------------------------------------------
 		-- Scan all recipes and mark the ones we know
 		-------------------------------------------------------------------------------
-		twipe(header_list)
+		table.wipe(header_list)

 		-- Save the state of the "Have Materials" checkbox.
 		local have_materials = TradeSkillFrameAvailableFilterCheckButton:GetChecked()
@@ -2129,7 +2129,7 @@ do
 	---Dumps the recipe database in a format that is readable to humans.
 	function addon:GetTextDump(profession)
 		local output = addon.db.profile.textdumpformat
-		twipe(text_table)
+		table.wipe(text_table)

 		if not output or output == "Comma" then
 			tinsert(text_table, strformat("Ackis Recipe List Text Dump for %s's %s, in the form of Comma Separated Values.\n  ", UnitName("player"), profession))
@@ -2206,7 +2206,7 @@ do

 				-- Find out which unique acquire methods we have
 				local acquire_data = recipe["acquire_data"]
-				twipe(acquire_list)
+				table.wipe(acquire_list)

 				for acquire_type in pairs(acquire_data) do
 					acquire_list[ACQUIRE_NAMES[acquire_type]] = true