mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Use int instead of short where possible
This commit is contained in:
parent
6ecb45d661
commit
01df4d3c81
3 changed files with 4 additions and 4 deletions
|
@ -114,7 +114,7 @@ class misc : public QObject{
|
|||
return tr("Unknown", "Unknown (size)");
|
||||
}
|
||||
const QString units[4] = {tr("B", "bytes"), tr("KiB", "kibibytes (1024 bytes)"), tr("MiB", "mebibytes (1024 kibibytes)"), tr("GiB", "gibibytes (1024 mibibytes)")};
|
||||
for(unsigned short i=0; i<5; ++i) {
|
||||
for(unsigned int i=0; i<5; ++i) {
|
||||
if (val < 1024.) {
|
||||
snprintf(tmp, MAX_CHAR_TMP, "%.1f", val);
|
||||
return QString::fromUtf8(tmp) + QString::fromUtf8(" ") + units[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue