1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-06-25 19:47:12 -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 local old_bytes = self.old_bytes
if self.once then if self.once then
for k, v in pairs(bytes) do for k, v in pairs(bytes) do
local i = tonumber(k) - self.begin local i = k - self.begin
local x = tonumber(v) local x = v
local x1 = tonumber(old_bytes[k]) local x1 = old_bytes[k]
if x ~= x1 then if x ~= x1 then
self:mark(i, x, x1) self:mark(i, x, x1)
end end
@ -41,4 +41,3 @@ function Monitor:save(fn)
self.dirty = false self.dirty = false
end end
end end