avoid implicit promotion from float to double.
Signed-off-by: Kefu Chai <kchai@redhat.com>
ostream *ss) {
vector<int> weight(weightf.size());
for (unsigned i = 0; i < weightf.size(); ++i) {
- weight[i] = (int)(weightf[i] * (float)0x10000);
+ weight[i] = (int)(weightf[i] * (double)0x10000);
}
return choose_args_adjust_item_weight(cct, cmap, id, weight, ss);
}
inline ostream& operator<<(ostream& out, const weightf_t& w)
{
- if (w.v < -0.01) {
+ if (w.v < -0.01F) {
return out << "-";
- } else if (w.v < 0.000001) {
+ } else if (w.v < 0.000001F) {
return out << "0";
} else {
std::streamsize p = out.precision();