Use static_cast<float>(...) instead C-style cast
This commit is contained in:
parent
c43346134d
commit
c07b18a9d8
@ -56,7 +56,7 @@ float StatisticsParser::getChannelFieldValue(uint8_t channel, uint8_t fieldId)
|
|||||||
val |= _payloadStatistic[ptr];
|
val |= _payloadStatistic[ptr];
|
||||||
} while (++ptr != end);
|
} while (++ptr != end);
|
||||||
|
|
||||||
return (float)(val) / (float)(div);
|
return static_cast<float>(val) / static_cast<float>(div);
|
||||||
} else {
|
} else {
|
||||||
// Value has to be calculated
|
// Value has to be calculated
|
||||||
return calcFunctions[b[pos].start].func(this, b[pos].num);
|
return calcFunctions[b[pos].start].func(this, b[pos].num);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user