#803: Fixed Rational/URational issues on Solaris.

This commit is contained in:
Andreas Huggel 2012-03-11 01:48:45 +00:00
parent 1dd39bacc4
commit cd7dd0ca8b
2 changed files with 3 additions and 2 deletions

View File

@ -591,7 +591,7 @@ namespace Exiv2 {
double dhour = pos->toFloat(0);
double dmin = pos->toFloat(1);
// Hack: Need Value::toDouble
URational r = pos->toRational(2);
Rational r = pos->toRational(2);
double dsec = static_cast<double>(r.first)/r.second;
if (!pos->value().ok()) {

View File

@ -1035,7 +1035,8 @@ namespace Exiv2 {
if (ifdId == canonSiId) {
// Exif.Photo.FNumber
float f = fnumber(canonEv(aperture));
URational ur = floatToRationalCast(f);
Rational r = floatToRationalCast(f);
URational ur(r.first, r.second);
URationalValue fn;
fn.value_.push_back(ur);
image.exifData().add(ExifKey("Exif.Photo.FNumber"), &fn);