Follow clang-tidy and clazy suggestions

variables non-POD should not be 'static' outside a class. Always use and init variables. Delete useless classes.
This commit is contained in:
Bruno
2021-07-17 16:45:01 +02:00
parent 5930b0f8fe
commit a18fd3177c
27 changed files with 112 additions and 174 deletions

View File

@@ -85,7 +85,8 @@ std::string BaseToolkit::byte_to_string(long b)
++i;
numbytes /= 1024.0;
}
oss << std::fixed << std::setprecision(2) << numbytes << *i;
oss << std::fixed << std::setprecision(2) << numbytes;
if (i != list.end()) oss << *i;
return oss.str();
}
@@ -102,7 +103,8 @@ std::string BaseToolkit::bits_to_string(long b)
++i;
numbytes /= 1000.0;
}
oss << std::fixed << std::setprecision(2) << numbytes << *i;
oss << std::fixed << std::setprecision(2) << numbytes;
if (i != list.end()) oss << *i;
return oss.str();
}