aboutsummaryrefslogtreecommitdiffstats
path: root/src/exiv2wrapper.hpp
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-05-18 18:09:04 +0200
committerOlivier Tilloy <olivier@tilloy.net>2010-05-18 18:09:04 +0200
commitb5865c8d2dc7a61dbecb5cabc8f7173d79e4afbe (patch)
tree7a8f6885870956ce5e0f210cbfbda2871607c45b /src/exiv2wrapper.hpp
parent7757719639bdac43ad7eba141e7a77642eebd621 (diff)
downloadpyexiv2-b5865c8d2dc7a61dbecb5cabc8f7173d79e4afbe.tar.gz
Do not copy a subset of the IptcData, instead pass around a pointer to it and do the required arithmetics.
This avoids leaking memory when instantiating an IptcTag from existing metadata. Factored out the code that sets the values of an IptcData for a given key (used in two places). Got rid of the copy of the FindIptcdatum unary predicate.
Diffstat (limited to 'src/exiv2wrapper.hpp')
-rw-r--r--src/exiv2wrapper.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/exiv2wrapper.hpp b/src/exiv2wrapper.hpp
index 50470f4..0408e1a 100644
--- a/src/exiv2wrapper.hpp
+++ b/src/exiv2wrapper.hpp
@@ -73,7 +73,7 @@ class IptcTag
{
public:
// Constructor
- IptcTag(const std::string& key, Exiv2::IptcMetadata* data=0);
+ IptcTag(const std::string& key, Exiv2::IptcData* data=0);
~IptcTag();
@@ -92,8 +92,8 @@ public:
private:
Exiv2::IptcKey _key;
- bool _from_data; // whether the tag is built from an existing IptcMetadata
- Exiv2::IptcMetadata* _data; // _data contains only data with _key
+ bool _from_data; // whether the tag is built from an existing IptcData
+ Exiv2::IptcData* _data;
std::string _type;
std::string _name;
std::string _title;