Optimization: Use constant folding for divisions not a power of two (#9609)

This commit is contained in:
zwim
2022-10-10 22:21:27 +02:00
committed by GitHub
parent a24548ed3f
commit 4969811c08
40 changed files with 118 additions and 118 deletions

View File

@@ -64,7 +64,7 @@ function ReaderDeviceStatus:init()
if statm then
local dummy, rss = statm:read("*number", "*number")
statm:close()
rss = math.floor(rss * 4096 / 1024 / 1024)
rss = math.floor(rss * (4096 / 1024 / 1024))
if rss >= self.memory_threshold then
if self.memory_confirm_box then
UIManager:close(self.memory_confirm_box)