Skip to content

Commit

Permalink
Move Metadatum::toUint32() implementation out of header file.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Feb 19, 2022
1 parent 5db9a25 commit a7ce4ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions include/exiv2/metadatum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,7 @@ namespace Exiv2 {
/*!
@brief Return the <EM>n</EM>-th component of the value converted to uint32_t.
*/
uint32_t toUint32(long n =0) const {
return static_cast<uint32_t>(toInt64(n));
}
uint32_t toUint32(long n =0) const;
/*!
@brief Return the <EM>n</EM>-th component of the value converted to float.
The return value is -1 if the value is not set and the behaviour
Expand Down
4 changes: 4 additions & 0 deletions src/metadatum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ namespace Exiv2 {
return os.str();
}

uint32_t Metadatum::toUint32(long n) const {
return static_cast<uint32_t>(toInt64(n));
}

bool cmpMetadataByTag(const Metadatum& lhs, const Metadatum& rhs)
{
return lhs.tag() < rhs.tag();
Expand Down

0 comments on commit a7ce4ee

Please sign in to comment.