Skip to content

Commit 763cfaf

Browse files
committed
MSVC warning fixes
Signed-off-by: Rosen Penev <[email protected]>
1 parent 1f3d1f0 commit 763cfaf

File tree

4 files changed

+27
-33
lines changed

4 files changed

+27
-33
lines changed

include/exiv2/types.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,16 @@ struct EXIV2API DataBuf {
162162
using iterator = std::vector<byte>::iterator;
163163
using const_iterator = std::vector<byte>::const_iterator;
164164

165-
inline iterator begin() noexcept {
165+
iterator begin() noexcept {
166166
return pData_.begin();
167167
}
168-
[[nodiscard]] inline const_iterator cbegin() const noexcept {
168+
[[nodiscard]] const_iterator cbegin() const noexcept {
169169
return pData_.cbegin();
170170
}
171-
inline iterator end() noexcept {
171+
iterator end() noexcept {
172172
return pData_.end();
173173
}
174-
[[nodiscard]] inline const_iterator cend() const noexcept {
174+
[[nodiscard]] const_iterator cend() const noexcept {
175175
return pData_.end();
176176
}
177177

src/tags.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@ using namespace Internal;
2020

2121
//! List of all defined Exif sections.
2222
constexpr auto sectionInfo = std::array{
23-
SectionInfo(SectionId::sectionIdNotSet, "(UnknownSection)", N_("Unknown section")),
24-
SectionInfo(SectionId::imgStruct, "ImageStructure", N_("Image data structure")),
25-
SectionInfo(SectionId::recOffset, "RecordingOffset", N_("Recording offset")),
26-
SectionInfo(SectionId::imgCharacter, "ImageCharacteristics", N_("Image data characteristics")),
27-
SectionInfo(SectionId::otherTags, "OtherTags", N_("Other data")),
28-
SectionInfo(SectionId::exifFormat, "ExifFormat", N_("Exif data structure")),
29-
SectionInfo(SectionId::exifVersion, "ExifVersion", N_("Exif version")),
30-
SectionInfo(SectionId::imgConfig, "ImageConfig", N_("Image configuration")),
31-
SectionInfo(SectionId::userInfo, "UserInfo", N_("User information")),
32-
SectionInfo(SectionId::relatedFile, "RelatedFile", N_("Related file")),
33-
SectionInfo(SectionId::dateTime, "DateTime", N_("Date and time")),
34-
SectionInfo(SectionId::captureCond, "CaptureConditions", N_("Picture taking conditions")),
35-
SectionInfo(SectionId::gpsTags, "GPS", N_("GPS information")),
36-
SectionInfo(SectionId::iopTags, "Interoperability", N_("Interoperability information")),
37-
SectionInfo(SectionId::mpfTags, "MPF", N_("CIPA Multi-Picture Format")),
38-
SectionInfo(SectionId::makerTags, "Makernote", N_("Vendor specific information")),
39-
SectionInfo(SectionId::dngTags, "DngTags", N_("Adobe DNG tags")),
40-
SectionInfo(SectionId::panaRaw, "PanasonicRaw", N_("Panasonic RAW tags")),
41-
SectionInfo(SectionId::tiffEp, "TIFF/EP", N_("TIFF/EP tags")),
42-
SectionInfo(SectionId::tiffPm6, "TIFF&PM6", N_("TIFF PageMaker 6.0 tags")),
43-
SectionInfo(SectionId::adobeOpi, "AdobeOPI", N_("Adobe OPI tags")),
44-
SectionInfo(SectionId::lastSectionId, "(LastSection)", N_("Last section")),
23+
SectionInfo{SectionId::sectionIdNotSet, "(UnknownSection)", N_("Unknown section")},
24+
SectionInfo{SectionId::imgStruct, "ImageStructure", N_("Image data structure")},
25+
SectionInfo{SectionId::recOffset, "RecordingOffset", N_("Recording offset")},
26+
SectionInfo{SectionId::imgCharacter, "ImageCharacteristics", N_("Image data characteristics")},
27+
SectionInfo{SectionId::otherTags, "OtherTags", N_("Other data")},
28+
SectionInfo{SectionId::exifFormat, "ExifFormat", N_("Exif data structure")},
29+
SectionInfo{SectionId::exifVersion, "ExifVersion", N_("Exif version")},
30+
SectionInfo{SectionId::imgConfig, "ImageConfig", N_("Image configuration")},
31+
SectionInfo{SectionId::userInfo, "UserInfo", N_("User information")},
32+
SectionInfo{SectionId::relatedFile, "RelatedFile", N_("Related file")},
33+
SectionInfo{SectionId::dateTime, "DateTime", N_("Date and time")},
34+
SectionInfo{SectionId::captureCond, "CaptureConditions", N_("Picture taking conditions")},
35+
SectionInfo{SectionId::gpsTags, "GPS", N_("GPS information")},
36+
SectionInfo{SectionId::iopTags, "Interoperability", N_("Interoperability information")},
37+
SectionInfo{SectionId::mpfTags, "MPF", N_("CIPA Multi-Picture Format")},
38+
SectionInfo{SectionId::makerTags, "Makernote", N_("Vendor specific information")},
39+
SectionInfo{SectionId::dngTags, "DngTags", N_("Adobe DNG tags")},
40+
SectionInfo{SectionId::panaRaw, "PanasonicRaw", N_("Panasonic RAW tags")},
41+
SectionInfo{SectionId::tiffEp, "TIFF/EP", N_("TIFF/EP tags")},
42+
SectionInfo{SectionId::tiffPm6, "TIFF&PM6", N_("TIFF PageMaker 6.0 tags")},
43+
SectionInfo{SectionId::adobeOpi, "AdobeOPI", N_("Adobe OPI tags")},
44+
SectionInfo{SectionId::lastSectionId, "(LastSection)", N_("Last section")},
4545
};
4646

4747
} // namespace Exiv2

src/tags_int.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ namespace Exiv2::Internal {
1717

1818
//! The details of a section.
1919
struct SectionInfo {
20-
constexpr SectionInfo(SectionId sectionId, const char* name, const char* desc) :
21-
sectionId_(sectionId), name_(name), desc_(desc) {
22-
}
2320
SectionId sectionId_; //!< Section id
2421
const char* name_; //!< Section name (one word)
2522
const char* desc_; //!< Section description
@@ -48,9 +45,6 @@ struct StringTagDetails {
4845
const char* label_; //!< Translation of the tag value
4946

5047
//! Comparison operator for use with the find template
51-
bool operator==(const char* key) const {
52-
return (strcmp(val_, key) == 0);
53-
}
5448
bool operator==(const std::string& key) const {
5549
return (key == val_);
5650
}

src/tiffcomposite_int.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class TiffPathItem {
6464
//! @name Creators
6565
//@{
6666
//! Constructor
67-
TiffPathItem(uint32_t extendedTag, IfdId group) : extendedTag_(extendedTag), group_(group) {
67+
constexpr TiffPathItem(uint32_t extendedTag, IfdId group) : extendedTag_(extendedTag), group_(group) {
6868
}
6969
//@}
7070

0 commit comments

Comments
 (0)