- Use int instead of short where possible

This commit is contained in:
Christophe Dumez 2007-08-28 16:55:14 +00:00
parent 6ecb45d661
commit 01df4d3c81
3 changed files with 4 additions and 4 deletions

View file

@ -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];