[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:53 UTC 2017


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

The following commit has been merged in the master branch:
commit 72f9786ad3235a518cc3d6eee148d93944cd9e1d
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Wed Dec 22 10:34:32 2004 +0000

    Added very basic assignment op and copy constructor to ExifData - untested
---
 src/exif.cpp | 29 +++++++++++++++++++++++++++++
 src/exif.hpp |  8 ++++----
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/src/exif.cpp b/src/exif.cpp
index c1e04ef..e642764 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -309,11 +309,40 @@ namespace Exiv2 {
     {
     }
 
+    ExifData::ExifData(const ExifData& rhs)
+        : tiffHeader_(rhs.tiffHeader_), exifMetadata_(rhs.exifMetadata_),
+          ifd0_(ifd0Id, 0, false), 
+          exifIfd_(exifIfdId, 0, false), iopIfd_(iopIfdId, 0, false), 
+          gpsIfd_(gpsIfdId, 0, false), ifd1_(ifd1Id, 0, false), 
+          size_(0), pData_(0), compatible_(false)
+    {
+        if (rhs.makerNote_.get() != 0) makerNote_ = rhs.makerNote_->clone();
+    }
+
     ExifData::~ExifData()
     {
         delete[] pData_;
     }
 
+    ExifData& ExifData::operator=(const ExifData& rhs)
+    {
+        if (this == &rhs) return *this;
+        tiffHeader_ = rhs.tiffHeader_;
+        exifMetadata_ = rhs.exifMetadata_;
+        makerNote_.reset();
+        if (rhs.makerNote_.get() != 0) makerNote_ = rhs.makerNote_->clone();
+        ifd0_.clear();
+        exifIfd_.clear();
+        iopIfd_.clear();
+        gpsIfd_.clear();
+        ifd1_.clear();
+        size_ = 0;
+        delete[] pData_;
+        pData_ = 0;
+        compatible_ = false;
+        return *this;
+    }
+
     Exifdatum& ExifData::operator[](const std::string& key)
     {
         ExifKey exifKey(key);
diff --git a/src/exif.hpp b/src/exif.hpp
index 5b6db5c..ec632dd 100644
--- a/src/exif.hpp
+++ b/src/exif.hpp
@@ -482,10 +482,6 @@ namespace Exiv2 {
     class ExifData {
         //! @name Not implemented
         //@{
-        //! Copying not allowed (Todo: implement me!)
-        ExifData(const ExifData& rhs);
-        //! Assignment not allowed (IFD does not have an assignment operator)
-        ExifData& operator=(const ExifData& rhs);
         //@}
     public:
         //! ExifMetadata iterator type
@@ -497,12 +493,16 @@ namespace Exiv2 {
         //@{
         //! Default constructor
         ExifData();
+        //! Copy constructor (Todo: copy image data also)
+        ExifData(const ExifData& rhs);
         //! Destructor
         ~ExifData();
         //@}
 
         //! @name Manipulators
         //@{
+        //! Assignment operator (Todo: assign image data also)
+        ExifData& operator=(const ExifData& rhs);
         /*!
           @brief Read the Exif data from file \em path.
           @param path Path to the file

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list