mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 23:42:46 -07:00
Remove redundant variable
This commit is contained in:
parent
fbd5699786
commit
431e7179ac
1 changed files with 4 additions and 4 deletions
|
@ -80,13 +80,13 @@ namespace
|
|||
if (sizeInBytes < 0) return false;
|
||||
|
||||
int i = 0;
|
||||
auto rawVal = static_cast<qreal>(sizeInBytes);
|
||||
val = static_cast<qreal>(sizeInBytes);
|
||||
|
||||
while ((rawVal >= 1024.) && (i <= static_cast<int>(Utils::Misc::SizeUnit::ExbiByte))) {
|
||||
rawVal /= 1024.;
|
||||
while ((val >= 1024.) && (i <= static_cast<int>(Utils::Misc::SizeUnit::ExbiByte))) {
|
||||
val /= 1024.;
|
||||
++i;
|
||||
}
|
||||
val = rawVal;
|
||||
|
||||
unit = static_cast<Utils::Misc::SizeUnit>(i);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue