Fix compiler warning in PerfdataValue::Parse.

Fixes #5055
This commit is contained in:
Gunnar Beutner 2013-11-11 13:14:42 +01:00
parent 4f1cb83f31
commit 95712e46d4
1 changed files with 6 additions and 6 deletions

View File

@ -63,24 +63,24 @@ Value PerfdataValue::Parse(const String& perfdata)
boost::algorithm::to_lower(unit);
if (unit == "us") {
value /= 1000 * 1000;
value /= 1000.0 * 1000.0;
unit = "seconds";
} else if (unit == "ms") {
value /= 1000;
value /= 1000.0;
unit = "seconds";
} else if (unit == "s") {
unit = "seconds";
} else if (unit == "tb") {
value *= 1024 * 1024 * 1024 * 1024;
value *= 1024.0 * 1024.0 * 1024.0 * 1024.0;
unit = "bytes";
} else if (unit == "gb") {
value *= 1024 * 1024 * 1024;
value *= 1024.0 * 1024.0 * 1024.0;
unit = "bytes";
} else if (unit == "mb") {
value *= 1024 * 1024;
value *= 1024.0 * 1024.0;
unit = "bytes";
} else if (unit == "kb") {
value *= 1024;
value *= 1024.0;
unit = "bytes";
} else if (unit == "b") {
unit = "bytes";