summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-12-28 07:33:16 +0100
committerJeija <norrepli@gmail.com>2012-12-28 07:33:16 +0100
commit7e231b99a6e816a5327d336d800686b0591c946f (patch)
treec3a0e98acea56b7d7011eedb4ee8f2695393191e
parent2bbc9dd4b76ba5df543442b1e30f91b26de45da5 (diff)
downloadmesecons-7e231b99a6e816a5327d336d800686b0591c946f.tar
mesecons-7e231b99a6e816a5327d336d800686b0591c946f.tar.gz
mesecons-7e231b99a6e816a5327d336d800686b0591c946f.tar.bz2
mesecons-7e231b99a6e816a5327d336d800686b0591c946f.tar.xz
mesecons-7e231b99a6e816a5327d336d800686b0591c946f.zip
Make nr in rules rotation local in order not to pullute the holy global namespace
-rw-r--r--mesecons/internal.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesecons/internal.lua b/mesecons/internal.lua
index ac16103..2d84787 100644
--- a/mesecons/internal.lua
+++ b/mesecons/internal.lua
@@ -428,7 +428,7 @@ end
--Rules rotation Functions:
function mesecon:rotate_rules_right(rules)
- nr = {}
+ local nr = {}
for i, rule in ipairs(rules) do
table.insert(nr, {
x = -rule.z,
@@ -439,7 +439,7 @@ function mesecon:rotate_rules_right(rules)
end
function mesecon:rotate_rules_left(rules)
- nr = {}
+ local nr = {}
for i, rule in ipairs(rules) do
table.insert(nr, {
x = rule.z,
@@ -450,7 +450,7 @@ function mesecon:rotate_rules_left(rules)
end
function mesecon:rotate_rules_down(rules)
- nr = {}
+ local nr = {}
for i, rule in ipairs(rules) do
table.insert(nr, {
x = -rule.y,
@@ -461,7 +461,7 @@ function mesecon:rotate_rules_down(rules)
end
function mesecon:rotate_rules_up(rules)
- nr = {}
+ local nr = {}
for i, rule in ipairs(rules) do
table.insert(nr, {
x = rule.y,