Browse Source

Remove redundant variable

adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
431e7179ac
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 8
      src/base/utils/misc.cpp

8
src/base/utils/misc.cpp

@ -80,13 +80,13 @@ namespace
if (sizeInBytes < 0) return false; if (sizeInBytes < 0) return false;
int i = 0; 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))) { while ((val >= 1024.) && (i <= static_cast<int>(Utils::Misc::SizeUnit::ExbiByte))) {
rawVal /= 1024.; val /= 1024.;
++i; ++i;
} }
val = rawVal;
unit = static_cast<Utils::Misc::SizeUnit>(i); unit = static_cast<Utils::Misc::SizeUnit>(i);
return true; return true;
} }

Loading…
Cancel
Save