mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
neutrino: avoid float for percent calculations
Origin commit data
------------------
Commit: fb6633b7aa
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-12-25 (Sun, 25 Dec 2011)
This commit is contained in:
@@ -80,7 +80,7 @@ void CProgressWindow::showGlobalStatus(const unsigned int prog)
|
||||
if (global_progress > 100)
|
||||
global_progress = 100;
|
||||
|
||||
pos += int( float(width-20)/100.0 * global_progress);
|
||||
pos += (width - 20) * global_progress / 100;
|
||||
//vordergrund
|
||||
frameBuffer->paintBox(x+10, globalstatusY,pos, globalstatusY+10, COL_MENUCONTENT_PLUS_7);
|
||||
}
|
||||
@@ -106,7 +106,7 @@ void CProgressWindow::showLocalStatus(const unsigned int prog)
|
||||
if (local_progress > 100)
|
||||
local_progress = 100;
|
||||
|
||||
pos += int( float(width-20)/100.0 * local_progress);
|
||||
pos += (width - 20) * local_progress / 100;
|
||||
//vordergrund
|
||||
frameBuffer->paintBox(x+10, localstatusY,pos, localstatusY+10, COL_MENUCONTENT_PLUS_7);
|
||||
}
|
||||
|
Reference in New Issue
Block a user