1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-06-16 16:33:06 -07:00

clean up redundant tonumber()

This commit is contained in:
Connor Olding 2015-05-03 12:25:18 -07:00
parent 96bad6dbfd
commit 4c363dae6f

View File

@ -17,9 +17,9 @@ function Monitor:diff()
local old_bytes = self.old_bytes
if self.once then
for k, v in pairs(bytes) do
local i = tonumber(k) - self.begin
local x = tonumber(v)
local x1 = tonumber(old_bytes[k])
local i = k - self.begin
local x = v
local x1 = old_bytes[k]
if x ~= x1 then
self:mark(i, x, x1)
end
@ -41,4 +41,3 @@ function Monitor:save(fn)
self.dirty = false
end
end