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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:39:51 UTC 2017


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

The following commit has been merged in the master branch:
commit bd1e9d239f45477be2567a47edd31987ff60e6fd
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Fri Sep 26 15:20:57 2008 +0000

    Some performance tweaks (analysis by Vladimir Nadvornik)
---
 src/tags.cpp | 14 +++++++++++---
 src/tags.hpp |  2 +-
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/tags.cpp b/src/tags.cpp
index 7182049..54c0d06 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -47,6 +47,7 @@ EXIV2_RCSID("@(#) $Id$")
 #include <cstdlib>
 #include <cassert>
 #include <cmath>
+#include <cstring>
 
 #ifdef EXV_HAVE_ICONV
 # include <iconv.h>
@@ -75,9 +76,11 @@ namespace Exiv2 {
         return ifdId_ == ifdId;
     }
 
-    bool IfdInfo::operator==(Item item) const
+    bool IfdInfo::operator==(const Item& item) const
     {
-        return std::string(item_) == item.i_;
+        const char* i = item.i_.c_str();
+        if (i == 0) return false;
+        return (strlen(i) == strlen(item_) && 0 == strcmp(i, item_));
     }
 
     // Important: IFD item must be unique!
@@ -1619,8 +1622,13 @@ namespace Exiv2 {
     {
         const TagInfo* ti = tagList(ifdId);
         if (ti == 0) return 0;
+        const char* tn = tagName.c_str();
+        if (tn == 0) return 0;
         for (int idx = 0; ti[idx].tag_ != 0xffff; ++idx) {
-            if (std::string(ti[idx].name_) == tagName) return &ti[idx];
+            if (   strlen(ti[idx].name_) == strlen(tn)
+                && strcmp(ti[idx].name_, tn) == 0) {
+                return &ti[idx];
+            }
         }
         return 0;
     } // ExifTags::tagInfo
diff --git a/src/tags.hpp b/src/tags.hpp
index 739b23b..c80d624 100644
--- a/src/tags.hpp
+++ b/src/tags.hpp
@@ -76,7 +76,7 @@ namespace Exiv2 {
     struct EXIV2API IfdInfo {
         struct Item;
         bool operator==(IfdId ifdId) const;     //!< Comparison operator for IFD id
-        bool operator==(Item item) const;       //!< Comparison operator for IFD item
+        bool operator==(const Item& item) const;       //!< Comparison operator for IFD item
         IfdId ifdId_;                           //!< IFD id
         const char* name_;                      //!< IFD name
         const char* item_; //!< Related IFD item. This is also an IFD name, unique for each IFD.

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list