From 33e5ef5ffd494aa930acb95c80962638a37da00d Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 9 Feb 2023 14:45:15 -0800 Subject: [PATCH] remove constructors Just direct initialize Signed-off-by: Rosen Penev --- src/makernote_int.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/makernote_int.cpp b/src/makernote_int.cpp index 8144f632..6ffcb42e 100644 --- a/src/makernote_int.cpp +++ b/src/makernote_int.cpp @@ -842,9 +842,6 @@ TiffComponent* newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup) { struct NikonArrayIdx { //! Key for comparisons struct Key { - //! Constructor - Key(uint16_t tag, const char* ver, size_t size) : tag_(tag), ver_(ver), size_(size) { - } uint16_t tag_; //!< Tag number const char* ver_; //!< Version string size_t size_; //!< Size of the data (not the version string) @@ -910,7 +907,7 @@ int nikonSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* / if (size < 4) return -1; - auto ix = NikonArrayIdx::Key(tag, reinterpret_cast(pData), size); + auto ix = NikonArrayIdx::Key{tag, reinterpret_cast(pData), size}; auto it = Exiv2::find(nikonArrayIdx, ix); if (!it) return -1; @@ -923,7 +920,7 @@ DataBuf nikonCrypt(uint16_t tag, const byte* pData, size_t size, TiffComponent* if (size < 4) return buf; - auto nci = Exiv2::find(nikonArrayIdx, NikonArrayIdx::Key(tag, reinterpret_cast(pData), size)); + auto nci = Exiv2::find(nikonArrayIdx, NikonArrayIdx::Key{tag, reinterpret_cast(pData), size}); if (!nci || nci->start_ == NA || size <= nci->start_) return buf;