#677: Changed the container for Exif metadata from a std::vector to a std::list (plus an unrelated optimization).

v0.27.3
Andreas Huggel 16 years ago
parent 2ce6c3dd00
commit ed6f195c7f

@ -601,12 +601,12 @@ namespace Exiv2 {
void ExifData::sortByKey()
{
std::sort(exifMetadata_.begin(), exifMetadata_.end(), cmpMetadataByKey);
exifMetadata_.sort(cmpMetadataByKey);
}
void ExifData::sortByTag()
{
std::sort(exifMetadata_.begin(), exifMetadata_.end(), cmpMetadataByTag);
exifMetadata_.sort(cmpMetadataByTag);
}
ExifData::iterator ExifData::erase(ExifData::iterator beg, ExifData::iterator end)

@ -38,7 +38,7 @@
// + standard includes
#include <string>
#include <vector>
#include <list>
#include <memory>
// *****************************************************************************
@ -423,7 +423,7 @@ namespace Exiv2 {
}; // class ExifThumb
//! Container type to hold all metadata
typedef std::vector<Exifdatum> ExifMetadata;
typedef std::list<Exifdatum> ExifMetadata;
/*!
@brief A container for Exif data. This is a top-level class of the %Exiv2

@ -161,8 +161,7 @@ namespace Exiv2 {
bool TiffGroupInfo::operator==(const std::string& groupName) const
{
std::string name(name_);
return name == groupName;
return 0 == strcmp(name_, groupName.c_str());
}
const char* tiffGroupName(uint16_t group)

Loading…
Cancel
Save