From 7d3f50c24479d29f5d9119b6201c1007d6dd9d2e Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Fri, 8 Jul 2005 15:50:52 +0000 Subject: [PATCH] Minor changes (moved inline functions which throw to *.cpp files) --- src/exif.cpp | 6 ++++++ src/exif.hpp | 3 +-- src/iptc.cpp | 6 ++++++ src/iptc.hpp | 3 +-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/exif.cpp b/src/exif.cpp index 7b907407..40903593 100644 --- a/src/exif.cpp +++ b/src/exif.cpp @@ -114,6 +114,12 @@ namespace Exiv2 { if (rhs.value_.get() != 0) value_ = rhs.value_->clone(); // deep copy } + const Value& Exifdatum::value() const + { + if (value_.get() == 0) throw Error(8); + return *value_; + } + Exifdatum& Exifdatum::operator=(const Exifdatum& rhs) { if (this == &rhs) return *this; diff --git a/src/exif.hpp b/src/exif.hpp index aab04a6c..21a5bb72 100644 --- a/src/exif.hpp +++ b/src/exif.hpp @@ -283,8 +283,7 @@ namespace Exiv2 { @return A constant reference to the value. @throw Error if the value is not set. */ - const Value& value() const - { if (value_.get() != 0) return *value_; throw Error(8); } + const Value& value() const; //! Return the size of the data area. long sizeDataArea() const { return value_.get() == 0 ? 0 : value_->sizeDataArea(); } diff --git a/src/iptc.cpp b/src/iptc.cpp index 25dca16e..7b16eec8 100644 --- a/src/iptc.cpp +++ b/src/iptc.cpp @@ -66,6 +66,12 @@ namespace Exiv2 { { } + const Value& Iptcdatum::value() const + { + if (value_.get() == 0) throw Error(8); + return *value_; + } + Iptcdatum& Iptcdatum::operator=(const Iptcdatum& rhs) { if (this == &rhs) return *this; diff --git a/src/iptc.hpp b/src/iptc.hpp index 1bbf678a..5300051c 100644 --- a/src/iptc.hpp +++ b/src/iptc.hpp @@ -226,8 +226,7 @@ namespace Exiv2 { @return A constant reference to the value. @throw Error If the value is not set. */ - const Value& value() const - { if (value_.get() != 0) return *value_; throw Error(8); } + const Value& value() const; //@} private: