Fix double promotion in target rtexif
This commit is contained in:
@@ -1391,9 +1391,9 @@ public:
|
||||
std::string toString (const Tag* t) const override
|
||||
{
|
||||
int a = t->toInt (0, BYTE);
|
||||
float b = float (10 * int (a >> 2)) * pow (4.f, float (int (a & 0x03) - 2));
|
||||
double b = static_cast<float>(10 * (a >> 2)) * std::pow(4.f, static_cast<float>((a & 0x03) - 2));
|
||||
|
||||
if (b > 1.f) {
|
||||
if (b > 1.0) {
|
||||
char buffer[32];
|
||||
sprintf (buffer, "%.2f", b );
|
||||
return buffer;
|
||||
@@ -1404,9 +1404,9 @@ public:
|
||||
double toDouble (const Tag* t, int ofs) override
|
||||
{
|
||||
int a = t->toInt (ofs, BYTE);
|
||||
float b = float (10 * int (a >> 2)) * pow (4.f, float (int (a & 0x03) - 2));
|
||||
double b = static_cast<float>(10 * (a >> 2)) * std::pow(4.f, static_cast<float>((a & 0x03) - 2));
|
||||
|
||||
if (b > 1.f) {
|
||||
if (b > 1.0) {
|
||||
return b;
|
||||
} else {
|
||||
return 0.;
|
||||
|
Reference in New Issue
Block a user