[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:27 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=102d1a9

The following commit has been merged in the master branch:
commit 102d1a9ba477906f00f4683c0904f4c106651f2a
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat Jun 19 11:17:17 2004 +0000

    Fixed MSVC errors and warnings (Steve, sking_5.patch)
    Replaced exp2f(x) with exp(log(2) * x)
---
 src/actions.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/actions.cpp b/src/actions.cpp
index 589e7c1..3c10e43 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -20,13 +20,13 @@
  */
 /*
   File:      actions.cpp
-  Version:   $Name:  $ $Revision: 1.25 $
+  Version:   $Name:  $ $Revision: 1.26 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   08-Dec-03, ahu: created
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.25 $ $RCSfile: actions.cpp,v $")
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.26 $ $RCSfile: actions.cpp,v $")
 
 // *****************************************************************************
 // included header files
@@ -49,7 +49,9 @@ EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.25 $ $RCSfile: actions.cpp,v $")
 #include <cmath>
 #include <sys/types.h>                  // for stat()
 #include <sys/stat.h>                   // for stat()
+#ifndef _MSC_VER
 #include <unistd.h>                     // for stat()
+#endif
 
 // *****************************************************************************
 // local declarations
@@ -176,12 +178,12 @@ namespace Action {
         if (0 == printTag(exifData, "Image.CaptureConditions.ExposureTime")) {
             md = exifData.findKey("Image.CaptureConditions.ShutterSpeedValue");
             if (md != exifData.end()) {
-                float f = exp2f(md->toFloat()) + 0.5;
-                if (f > 1) {
-                    std::cout << "1/" << static_cast<long>(f) << " s";
+                double tmp = exp(log(2) * md->toFloat()) + 0.5;
+                if (tmp > 1) {
+                    std::cout << "1/" << static_cast<long>(tmp) << " s";
                 }
                 else {
-                    std::cout << static_cast<long>(1/f) << " s";
+                    std::cout << static_cast<long>(1/tmp) << " s";
                 }
             }
         }
@@ -195,7 +197,7 @@ namespace Action {
             md = exifData.findKey("Image.CaptureConditions.ApertureValue");
             if (md != exifData.end()) {
                 std::cout << std::fixed << std::setprecision(1)
-                          << "F" << exp2f(md->toFloat()/2);
+                          << "F" << exp(log(2) * md->toFloat() / 2);
             }
         }
         std::cout << "
";

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list