* Use SPDX identifier in header files * Use SPDX identifier in rest of source files * Fix usage of SPDX for files with 2 licenses * Add global license file * Fix compilation
44 lines
950 B
C++
44 lines
950 B
C++
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// included header files
|
|
#include "metadatum.hpp"
|
|
|
|
// + standard includes
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
|
|
|
|
// *****************************************************************************
|
|
// class member definitions
|
|
namespace Exiv2 {
|
|
|
|
Key::UniquePtr Key::clone() const
|
|
{
|
|
return UniquePtr(clone_());
|
|
}
|
|
|
|
std::string Metadatum::print(const ExifData* pMetadata) const
|
|
{
|
|
std::ostringstream os;
|
|
write(os, pMetadata);
|
|
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();
|
|
}
|
|
|
|
|
|
bool cmpMetadataByKey(const Metadatum& lhs, const Metadatum& rhs)
|
|
{
|
|
return lhs.key() < rhs.key();
|
|
}
|
|
|
|
} // namespace Exiv2
|
|
|