Bugfix: wrong interpreter called due to invalid overriding (#4008)

This commit is contained in:
Hombre57
2017-09-19 01:07:25 +02:00
parent 97afbdc5c5
commit 77a86f5d1e
4 changed files with 25 additions and 25 deletions

View File

@@ -1102,7 +1102,7 @@ public:
sprintf (buffer, "%d", a);
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = Interpreter::toInt (t, ofs);
@@ -1113,7 +1113,7 @@ public:
return 0.;
}
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
int a = Interpreter::toInt (t, ofs, astype);

View File

@@ -55,7 +55,7 @@ public:
sprintf (buffer, "%d", a);
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->getValue()[ofs];
@@ -66,7 +66,7 @@ public:
return 0.;
}
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
int a = t->getValue()[ofs];

View File

@@ -1335,7 +1335,7 @@ public:
sprintf (buffer, "%d", a );
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a;
@@ -1366,7 +1366,7 @@ public:
return "n/a";
}
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
double a = double (t->toInt (0, LONG));
@@ -1396,7 +1396,7 @@ public:
return "n/a";
}
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->toInt (ofs, BYTE);
float b = float (10 * int (a >> 2)) * pow (4.f, float (int (a & 0x03) - 2));
@@ -1422,7 +1422,7 @@ public:
sprintf (buffer, "%.1f", v );
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->toInt (0, BYTE);
return 100.*exp (double (a - 32) * log (2.) / 8.);
@@ -1453,7 +1453,7 @@ public:
return "n/a";
}
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->toInt (0, BYTE);
a &= 0x7F;
@@ -1479,7 +1479,7 @@ public:
sprintf (buffer, "%.1f", v );
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->toInt (0, BYTE);
return double (a - 64) / 8.;
@@ -1499,7 +1499,7 @@ public:
sprintf (buffer, "%.1f", v );
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->toInt (0, SBYTE);
return double (a) / 8.;
@@ -1519,7 +1519,7 @@ public:
sprintf (buffer, "%.1f", v );
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->toInt (0, BYTE);
return exp ((double (a) - 68.) * log (2.) / 16.);
@@ -1539,7 +1539,7 @@ public:
sprintf (buffer, "%.6f", v );
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->toInt (0, BYTE);
return 24.*exp (- (double (a) - 32.) * log (2.) / 8.);
@@ -1559,7 +1559,7 @@ public:
sprintf (buffer, "%.1f", double (int (pow (2.0, double (mina + 10) / 4.0) + 0.2)));
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = t->toInt (0, BYTE) & 0x0F;
return double (int (pow (2.0, double (a + 10) / 4.0) + 0.2));
@@ -1579,7 +1579,7 @@ public:
sprintf (buffer, "%.1f", double (int (pow (2.0, double (maxa) / 4.0) + 0.2)) );
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
int a = ( t->toInt (0, BYTE) & 0xF0) >> 4;
return double (int (pow (2.0, double (a) / 4.0) + 0.2));

View File

@@ -2010,7 +2010,7 @@ public:
return "n/a";
}
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
// Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT
TagType astype = t->getType();
@@ -2029,7 +2029,7 @@ public:
return 0.;
}
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
// Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT
int a = 0;
@@ -2070,7 +2070,7 @@ public:
return "n/a";
}
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
// Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT
TagType astype = t->getType();
@@ -2089,7 +2089,7 @@ public:
return 0.;
}
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
// Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT
int a = 0;
@@ -2130,7 +2130,7 @@ public:
return "Auto";
}
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
// Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT
int a = 0;
@@ -2166,7 +2166,7 @@ public:
sprintf (buffer, "%.2f", a );
return buffer;
}
virtual double toDouble (Tag* t, int ofs)
virtual double toDouble (const Tag* t, int ofs)
{
// Get the value
int a = t->getValue()[ofs];
@@ -2186,7 +2186,7 @@ public:
sprintf (buffer, "%d", t->getValue()[0] - 20);
return buffer;
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
return t->getValue()[0] - 20;
}
@@ -2207,7 +2207,7 @@ public:
return "Off";
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
return (t->getValue()[0] & 0x80) == 0x80 ? 1 : 0;
}
@@ -2225,7 +2225,7 @@ public:
sprintf (buffer, "%d", t->getValue()[0] & 0x7f);
return buffer;
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
return t->getValue()[0] & 0x7f;
}
@@ -2281,7 +2281,7 @@ public:
sprintf (buffer, "%d", t->toInt());
return buffer;
}
virtual int toInt (Tag* t, int ofs, TagType astype)
virtual int toInt (const Tag* t, int ofs, TagType astype)
{
int a = 0;