Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::array removals #2559

Merged
merged 2 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/easyaccess-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Type for an Exiv2 Easy access function
using EasyAccessFct = Exiv2::ExifData::const_iterator (*)(const Exiv2::ExifData&);

static constexpr struct {
static const struct {
const char* l;
EasyAccessFct f;
const char* n;
Expand Down
8 changes: 4 additions & 4 deletions src/datasets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

namespace Exiv2 {
constexpr auto familyName_ = "Iptc";
constexpr auto recordInfo_ = std::array{
RecordInfo{IptcDataSets::invalidRecord, "(invalid)", N_("(invalid)")},
RecordInfo{IptcDataSets::envelope, "Envelope", N_("IIM envelope record")},
RecordInfo{IptcDataSets::application2, "Application2", N_("IIM application record 2")},
constexpr RecordInfo recordInfo_[] = {
{IptcDataSets::invalidRecord, "(invalid)", N_("(invalid)")},
{IptcDataSets::envelope, "Envelope", N_("IIM envelope record")},
{IptcDataSets::application2, "Application2", N_("IIM application record 2")},
};

constexpr DataSet envelopeRecord[] = {
Expand Down
46 changes: 23 additions & 23 deletions src/tags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,29 @@ namespace Exiv2 {
using namespace Internal;

//! List of all defined Exif sections.
constexpr auto sectionInfo = std::array{
SectionInfo{SectionId::sectionIdNotSet, "(UnknownSection)", N_("Unknown section")},
SectionInfo{SectionId::imgStruct, "ImageStructure", N_("Image data structure")},
SectionInfo{SectionId::recOffset, "RecordingOffset", N_("Recording offset")},
SectionInfo{SectionId::imgCharacter, "ImageCharacteristics", N_("Image data characteristics")},
SectionInfo{SectionId::otherTags, "OtherTags", N_("Other data")},
SectionInfo{SectionId::exifFormat, "ExifFormat", N_("Exif data structure")},
SectionInfo{SectionId::exifVersion, "ExifVersion", N_("Exif version")},
SectionInfo{SectionId::imgConfig, "ImageConfig", N_("Image configuration")},
SectionInfo{SectionId::userInfo, "UserInfo", N_("User information")},
SectionInfo{SectionId::relatedFile, "RelatedFile", N_("Related file")},
SectionInfo{SectionId::dateTime, "DateTime", N_("Date and time")},
SectionInfo{SectionId::captureCond, "CaptureConditions", N_("Picture taking conditions")},
SectionInfo{SectionId::gpsTags, "GPS", N_("GPS information")},
SectionInfo{SectionId::iopTags, "Interoperability", N_("Interoperability information")},
SectionInfo{SectionId::mpfTags, "MPF", N_("CIPA Multi-Picture Format")},
SectionInfo{SectionId::makerTags, "Makernote", N_("Vendor specific information")},
SectionInfo{SectionId::dngTags, "DngTags", N_("Adobe DNG tags")},
SectionInfo{SectionId::panaRaw, "PanasonicRaw", N_("Panasonic RAW tags")},
SectionInfo{SectionId::tiffEp, "TIFF/EP", N_("TIFF/EP tags")},
SectionInfo{SectionId::tiffPm6, "TIFF&PM6", N_("TIFF PageMaker 6.0 tags")},
SectionInfo{SectionId::adobeOpi, "AdobeOPI", N_("Adobe OPI tags")},
SectionInfo{SectionId::lastSectionId, "(LastSection)", N_("Last section")},
constexpr SectionInfo sectionInfo[] = {
{SectionId::sectionIdNotSet, "(UnknownSection)", N_("Unknown section")},
{SectionId::imgStruct, "ImageStructure", N_("Image data structure")},
{SectionId::recOffset, "RecordingOffset", N_("Recording offset")},
{SectionId::imgCharacter, "ImageCharacteristics", N_("Image data characteristics")},
{SectionId::otherTags, "OtherTags", N_("Other data")},
{SectionId::exifFormat, "ExifFormat", N_("Exif data structure")},
{SectionId::exifVersion, "ExifVersion", N_("Exif version")},
{SectionId::imgConfig, "ImageConfig", N_("Image configuration")},
{SectionId::userInfo, "UserInfo", N_("User information")},
{SectionId::relatedFile, "RelatedFile", N_("Related file")},
{SectionId::dateTime, "DateTime", N_("Date and time")},
{SectionId::captureCond, "CaptureConditions", N_("Picture taking conditions")},
{SectionId::gpsTags, "GPS", N_("GPS information")},
{SectionId::iopTags, "Interoperability", N_("Interoperability information")},
{SectionId::mpfTags, "MPF", N_("CIPA Multi-Picture Format")},
{SectionId::makerTags, "Makernote", N_("Vendor specific information")},
{SectionId::dngTags, "DngTags", N_("Adobe DNG tags")},
{SectionId::panaRaw, "PanasonicRaw", N_("Panasonic RAW tags")},
{SectionId::tiffEp, "TIFF/EP", N_("TIFF/EP tags")},
{SectionId::tiffPm6, "TIFF&PM6", N_("TIFF PageMaker 6.0 tags")},
{SectionId::adobeOpi, "AdobeOPI", N_("Adobe OPI tags")},
{SectionId::lastSectionId, "(LastSection)", N_("Last section")},
};

} // namespace Exiv2
Expand Down