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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:41:58 UTC 2017


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

The following commit has been merged in the master branch:
commit d49caba41eae0d29448f14ebd4f62a7ea570a9e7
Author: HumanDynamo <caulier.gilles at gmail.com>
Date:   Fri Sep 24 08:46:58 2010 +0000

    new ExifKey constructor based on TagInfo container. Factoring duplicate code with other ExifKey constructor
---
 src/tags.cpp | 15 +++++++++++++--
 src/tags.hpp |  9 +++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/tags.cpp b/src/tags.cpp
index 6331c20..8c0bf26 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -2801,8 +2801,7 @@ namespace Exiv2 {
         key_ = std::string(familyName_) + "." + groupName_ + "." + tagName();
     }
 
-    ExifKey::ExifKey(uint16_t tag, const std::string& groupName)
-        : p_(new Impl)
+    void ExifKey::create_internal(uint16_t tag, const std::string& groupName)
     {
         IfdId ifdId = groupId(groupName);
         // Todo: Test if this condition can be removed
@@ -2817,6 +2816,18 @@ namespace Exiv2 {
         p_->makeKey(tag, ifdId, ti);
     }
 
+    ExifKey::ExifKey(uint16_t tag, const std::string& groupName)
+        : p_(new Impl)
+    {
+        create_internal(tag, groupName);
+    }
+
+    ExifKey::ExifKey(const TagInfo& ti)
+        : p_(new Impl)
+    {
+        create_internal(ti.tag_, Internal::groupName(static_cast<Internal::IfdId>(ti.ifdId_)));
+    }
+
     ExifKey::ExifKey(const std::string& key)
         : p_(new Impl)
     {
diff --git a/src/tags.hpp b/src/tags.hpp
index 3c2610a..f39937d 100644
--- a/src/tags.hpp
+++ b/src/tags.hpp
@@ -173,6 +173,13 @@ namespace Exiv2 {
                  and group name.
          */
         ExifKey(uint16_t tag, const std::string& groupName);
+        /*!
+          @brief Constructor to create an Exif key from a TagInfo instance.
+          @param ti The TagInfo instance
+          @throw Error if the key cannot be constructed from the tag number
+                 and group name.
+         */
+        ExifKey(const TagInfo& ti);
         //! Copy constructor
         ExifKey(const ExifKey& rhs);
         //! Destructor
@@ -212,6 +219,8 @@ namespace Exiv2 {
     private:
         //! Internal virtual copy constructor.
         EXV_DLLLOCAL virtual ExifKey* clone_() const;
+        //! Internal construction method.
+        void create_internal(uint16_t tag, const std::string& groupName);
 
     private:
         // Pimpl idiom

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list