Quantcast

Make patterns more space efficient

Kevin Lyles [01-07-12 - 06:12]
Make patterns more space efficient
Filename
Regexps.lua
diff --git a/Regexps.lua b/Regexps.lua
index 632cad4..447e0a3 100644
--- a/Regexps.lua
+++ b/Regexps.lua
@@ -23,14 +23,16 @@ local function makePatternTables()
 	local pattern, func, categories
 	for _, regex in ipairs(ww_MultipleStatLines) do
 		pattern, func, categories = unpack(regex)
+		local tbl = {pattern, func}
 		for _, category in ipairs(categories) do
-			table.insert(ww_regexes[category].MultipleStat, {pattern, func})
+			table.insert(ww_regexes[category].MultipleStat, tbl)
 		end
 	end
 	for _, regex in ipairs(ww_SingleStatLines) do
 		pattern, func, categories = unpack(regex)
+		local tbl = {pattern, func}
 		for _, category in ipairs(categories) do
-			table.insert(ww_regexes[category].SingleStat, {pattern, func})
+			table.insert(ww_regexes[category].SingleStat, tbl)
 		end
 	end
 end