diff --git a/include/exiv2/types.hpp b/include/exiv2/types.hpp index 38a6e1e0..12a6d871 100644 --- a/include/exiv2/types.hpp +++ b/include/exiv2/types.hpp @@ -162,16 +162,16 @@ struct EXIV2API DataBuf { using iterator = std::vector::iterator; using const_iterator = std::vector::const_iterator; - inline iterator begin() noexcept { + iterator begin() noexcept { return pData_.begin(); } - [[nodiscard]] inline const_iterator cbegin() const noexcept { + [[nodiscard]] const_iterator cbegin() const noexcept { return pData_.cbegin(); } - inline iterator end() noexcept { + iterator end() noexcept { return pData_.end(); } - [[nodiscard]] inline const_iterator cend() const noexcept { + [[nodiscard]] const_iterator cend() const noexcept { return pData_.end(); } diff --git a/src/tags.cpp b/src/tags.cpp index 5b89f928..71010706 100644 --- a/src/tags.cpp +++ b/src/tags.cpp @@ -20,28 +20,28 @@ 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")), + 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")}, }; } // namespace Exiv2 diff --git a/src/tags_int.hpp b/src/tags_int.hpp index ccffc6f7..8285fc18 100644 --- a/src/tags_int.hpp +++ b/src/tags_int.hpp @@ -17,9 +17,6 @@ namespace Exiv2::Internal { //! The details of a section. struct SectionInfo { - constexpr SectionInfo(SectionId sectionId, const char* name, const char* desc) : - sectionId_(sectionId), name_(name), desc_(desc) { - } SectionId sectionId_; //!< Section id const char* name_; //!< Section name (one word) const char* desc_; //!< Section description @@ -48,9 +45,6 @@ struct StringTagDetails { const char* label_; //!< Translation of the tag value //! Comparison operator for use with the find template - bool operator==(const char* key) const { - return (strcmp(val_, key) == 0); - } bool operator==(const std::string& key) const { return (key == val_); } diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index 64911a25..ecfc00f9 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -64,7 +64,7 @@ class TiffPathItem { //! @name Creators //@{ //! Constructor - TiffPathItem(uint32_t extendedTag, IfdId group) : extendedTag_(extendedTag), group_(group) { + constexpr TiffPathItem(uint32_t extendedTag, IfdId group) : extendedTag_(extendedTag), group_(group) { } //@}