mirror of
https://github.com/notwa/mm
synced 2024-06-28 12:57:12 -07:00
clean up redundant tonumber()
This commit is contained in:
parent
96bad6dbfd
commit
4c363dae6f
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user