[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:08 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=603680b
The following commit has been merged in the master branch:
commit 603680b2d16e88134ce6598b95b590fdaef6b9b7
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sun Jan 31 13:03:36 2010 +0000
Various optimizations (side-effect of the analysis for #677).
---
src/exif.cpp | 2 +-
src/tags.cpp | 4 +---
src/tiffimage.cpp | 6 ------
src/tiffimage_int.hpp | 24 ++++++++++++++----------
src/types.cpp | 20 ++++++++------------
5 files changed, 24 insertions(+), 32 deletions(-)
diff --git a/src/exif.cpp b/src/exif.cpp
index e3d6f16..7bd237a 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -75,7 +75,7 @@ namespace {
}
private:
- std::string key_;
+ const std::string& key_;
}; // class FindExifdatumByKey
diff --git a/src/tags.cpp b/src/tags.cpp
index bb6d622..1dcaa6f 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -88,9 +88,7 @@ namespace Exiv2 {
bool IfdInfo::operator==(const Item& item) const
{
- const char* i = item.i_.c_str();
- if (i == 0) return false;
- return 0 == strcmp(i, item_);
+ return 0 == strcmp(item.i_.c_str(), item_);
}
// Important: IFD item must be unique!
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index abb2347..4f67c83 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -1207,12 +1207,6 @@ namespace Exiv2 {
return encoderFct;
}
- bool TiffGroupStruct::operator==(const TiffGroupStruct::Key& key) const
- {
- return (Tag::all == extendedTag_ || key.e_ == extendedTag_)
- && key.g_ == group_;
- }
-
bool TiffTreeStruct::operator==(const TiffTreeStruct::Key& key) const
{
return key.r_ == root_ && key.g_ == group_;
diff --git a/src/tiffimage_int.hpp b/src/tiffimage_int.hpp
index 5f0c890..680a1dd 100644
--- a/src/tiffimage_int.hpp
+++ b/src/tiffimage_int.hpp
@@ -32,6 +32,7 @@
// *****************************************************************************
// included header files
#include "tifffwd_int.hpp"
+#include "tiffcomposite_int.hpp"
#include "image.hpp"
#include "types.hpp"
@@ -141,9 +142,20 @@ namespace Exiv2 {
defining the TIFF component used for each tag in a group.
*/
struct TiffGroupStruct {
- struct Key;
+ //! Search key for TIFF group structure.
+ struct Key {
+ //! Constructor
+ Key(uint32_t e, uint16_t g) : e_(e), g_(g) {}
+ uint32_t e_; //!< Extended tag
+ uint16_t g_; //!< %Group
+ };
+
//! Comparison operator to compare a TiffGroupStruct with a TiffGroupStruct::Key
- bool operator==(const Key& key) const;
+ bool operator==(const Key& key) const
+ {
+ return (Tag::all == extendedTag_ || key.e_ == extendedTag_)
+ && key.g_ == group_;
+ }
//! Return the tag corresponding to the extended tag
uint16_t tag() const { return static_cast<uint16_t>(extendedTag_ & 0xffff); }
@@ -153,14 +165,6 @@ namespace Exiv2 {
NewTiffCompFct newTiffCompFct_; //!< Function to create the correct TIFF component
};
- //! Search key for TIFF group structure.
- struct TiffGroupStruct::Key {
- //! Constructor
- Key(uint32_t e, uint16_t g) : e_(e), g_(g) {}
- uint32_t e_; //!< Extended tag
- uint16_t g_; //!< %Group
- };
-
/*!
@brief Data structure used as a row of the table which describes TIFF trees.
Multiple trees are needed as TIFF-based RAW image formats do not always
diff --git a/src/types.cpp b/src/types.cpp
index bfcf6c1..a598ada 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -59,9 +59,15 @@ namespace {
const char* name_; //!< Name of the type
long size_; //!< Bytes per data entry
//! Comparison operator for \em typeId
- bool operator==(Exiv2::TypeId typeId) const;
+ bool operator==(Exiv2::TypeId typeId) const
+ {
+ return typeId_ == typeId;
+ }
//! Comparison operator for \em name
- bool operator==(const std::string& name) const;
+ bool operator==(const std::string& name) const
+ {
+ return 0 == strcmp(name_, name.c_str());
+ }
}; // struct TypeInfoTable
//! Lookup list with information of Exiv2 types
@@ -92,16 +98,6 @@ namespace {
{ Exiv2::langAlt, "LangAlt", 1 }
};
- bool TypeInfoTable::operator==(Exiv2::TypeId typeId) const
- {
- return typeId_ == typeId;
- }
-
- bool TypeInfoTable::operator==(const std::string& name) const
- {
- return std::string(name_) == name;
- }
-
}
// *****************************************************************************
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list