aboutsummaryrefslogtreecommitdiff
path: root/compat53/module.lua
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2015-05-01 03:19:12 +0200
committerPhilipp Janda <siffiejoe@gmx.net>2015-05-01 03:19:12 +0200
commitdf9633cb76c08ab600ded4b3c2b2596edb5ba057 (patch)
tree76f60adf5f368b1ba934907db4a27389ae243381 /compat53/module.lua
parent924cdb2a7a6f50688c442e548179a725559572d4 (diff)
downloadlua-compat-5.3-0.2.tar.gz
lua-compat-5.3-0.2.tar.bz2
lua-compat-5.3-0.2.zip
Fix warnings emitted by luacheck.v0.2
Diffstat (limited to 'compat53/module.lua')
-rw-r--r--compat53/module.lua14
1 files changed, 3 insertions, 11 deletions
diff --git a/compat53/module.lua b/compat53/module.lua
index 0dd0317..f278f13 100644
--- a/compat53/module.lua
+++ b/compat53/module.lua
@@ -40,14 +40,6 @@ if lua_version < "5.3" then
40 end 40 end
41 end 41 end
42 42
43 local function checktype(x, t, i, f)
44 local xt = type(x)
45 if xt ~= t then
46 error("bad argument #"..i.." to '"..f.."' ("..t..
47 " expected, got "..xt..")", 0)
48 end
49 end
50
51 43
52 -- load utf8 library 44 -- load utf8 library
53 local utf8_ok, utf8lib = pcall(require, "compat53.utf8") 45 local utf8_ok, utf8lib = pcall(require, "compat53.utf8")
@@ -94,7 +86,7 @@ if lua_version < "5.3" then
94 86
95 -- update math library 87 -- update math library
96 do 88 do
97 local maxint, minint = 1, 0 89 local maxint, minint = 1
98 90
99 while maxint+1 > maxint and 2*maxint > maxint do 91 while maxint+1 > maxint and 2*maxint > maxint do
100 maxint = maxint * 2 92 maxint = maxint * 2
@@ -269,10 +261,10 @@ if lua_version < "5.3" then
269 x, y, a, b = y, x, b, a 261 x, y, a, b = y, x, b, a
270 end 262 end
271 if not cmp(y, z) then 263 if not cmp(y, z) then
272 y, z, b, c = z, y, c, b 264 y, b = z, c
273 end 265 end
274 if not cmp(x, y) then 266 if not cmp(x, y) then
275 x, y, a, b = y, x, b, a 267 y, b = x, a
276 end 268 end
277 return b, y 269 return b, y
278 else 270 else