[KPhotoAlbum] wrong GPS position
Robert Krawitz
rlk at alum.mit.edu
Sun Jul 22 21:27:29 BST 2018
Anybody object if I push this little cleanup while we're at it?
diff --git a/Exif/DatabaseElement.cpp b/Exif/DatabaseElement.cpp
index 2a0a871c..b1c10077 100644
--- a/Exif/DatabaseElement.cpp
+++ b/Exif/DatabaseElement.cpp
@@ -137,14 +137,12 @@ QVariant Exif::RationalExifElement::valueFromExif(Exiv2::ExifData &data) const
{
value = 0.0;
double divisor = 1.0;
- // hour / minute / second:
+ // degree / minute / second:
for (int i=0 ; i < 3 ; i++ )
{
double nom = tagDatum.toRational(i).first;
double denom = tagDatum.toRational(i).second;
- if ( denom == 0 )
- value += 0;
- else
+ if ( denom != 0 )
value += (nom / denom)/ divisor;
divisor *= 60.0;
}
--
Robert Krawitz <rlk at alum.mit.edu>
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
More information about the Kphotoalbum
mailing list