ECC-1467: Use grib_power<T> in unpack()

This commit is contained in:
Eugen Betke 2023-06-22 12:12:32 +00:00
parent e3ea8ecf1a
commit c3e41cc950
2 changed files with 4 additions and 4 deletions

View File

@ -288,8 +288,8 @@ static int unpack(grib_accessor* a, T* values, size_t* len)
}
}
s = grib_power<double>(binary_scale_factor, 2);
d = grib_power<double>(-decimal_scale_factor, 10);
s = grib_power<T>(binary_scale_factor, 2);
d = grib_power<T>(-decimal_scale_factor, 10);
for (i = 0; i < numberOfSecondOrderPackedValues; i++) {
values[i] = (T)(((X[i] * s) + reference_value) * d);
}

View File

@ -412,8 +412,8 @@ static int unpack(grib_accessor* a, T* values, size_t* len)
k++;
}
s = grib_power<double>(binary_scale_factor, 2);
d = grib_power<double>(-decimal_scale_factor, 10);
s = grib_power<T>(binary_scale_factor, 2);
d = grib_power<T>(-decimal_scale_factor, 10);
for (i = 0; i < n; i++) {
values[i] = (T)(((X[i] * s) + reference_value) * d);
}