mirror of
https://github.com/notwa/mm
synced 2024-11-04 20:09:03 -08:00
clean up redundant tonumber()
This commit is contained in:
parent
96bad6dbfd
commit
4c363dae6f
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue