diff --git a/src/tiffcomposite_int.cpp b/src/tiffcomposite_int.cpp index 68ad8825..fd7a5d5f 100644 --- a/src/tiffcomposite_int.cpp +++ b/src/tiffcomposite_int.cpp @@ -1138,7 +1138,7 @@ uint32_t TiffBinaryArray::doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, int uint32_t TiffBinaryElement::doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, int64_t /*offset*/, uint32_t /*valueIdx*/, uint32_t /*dataIdx*/, uint32_t& /*imageIdx*/) { - Value const* pv = pValue(); + auto pv = pValue(); if (!pv || pv->count() == 0) return 0; DataBuf buf(pv->size()); @@ -1511,13 +1511,13 @@ TiffType toTiffType(TypeId typeId) { return static_cast(typeId); } -bool cmpTagLt(TiffComponent const* lhs, TiffComponent const* rhs) { +bool cmpTagLt(const TiffComponent* lhs, const TiffComponent* rhs) { if (lhs->tag() != rhs->tag()) return lhs->tag() < rhs->tag(); return lhs->idx() < rhs->idx(); } -bool cmpGroupLt(TiffComponent const* lhs, TiffComponent const* rhs) { +bool cmpGroupLt(const TiffComponent* lhs, const TiffComponent* rhs) { return lhs->group() < rhs->group(); } diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index c6ad3bc4..f1abbc32 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -1508,13 +1508,13 @@ class TiffBinaryElement : public TiffEntryBase { @brief Compare two TIFF component pointers by tag. Return true if the tag of component lhs is less than that of rhs. */ -bool cmpTagLt(TiffComponent const* lhs, TiffComponent const* rhs); +bool cmpTagLt(const TiffComponent* lhs, const TiffComponent* rhs); /*! @brief Compare two TIFF component pointers by group. Return true if the group of component lhs is less than that of rhs. */ -bool cmpGroupLt(TiffComponent const* lhs, TiffComponent const* rhs); +bool cmpGroupLt(const TiffComponent* lhs, const TiffComponent* rhs); //! Function to create and initialize a new TIFF entry TiffComponent::UniquePtr newTiffEntry(uint16_t tag, IfdId group); diff --git a/src/tiffvisitor_int.cpp b/src/tiffvisitor_int.cpp index dd01ded5..82f6592c 100644 --- a/src/tiffvisitor_int.cpp +++ b/src/tiffvisitor_int.cpp @@ -254,7 +254,7 @@ void TiffDecoder::visitIfdMakernote(TiffIfdMakernote* object) { } } -void TiffDecoder::getObjData(byte const*& pData, size_t& size, uint16_t tag, IfdId group, const TiffEntryBase* object) { +void TiffDecoder::getObjData(const byte*& pData, size_t& size, uint16_t tag, IfdId group, const TiffEntryBase* object) { if (object && object->tag() == tag && object->group() == group) { pData = object->pData(); size = object->size(); @@ -262,7 +262,7 @@ void TiffDecoder::getObjData(byte const*& pData, size_t& size, uint16_t tag, Ifd } TiffFinder finder(tag, group); pRoot_->accept(finder); - TiffEntryBase const* te = dynamic_cast(finder.result()); + auto te = dynamic_cast(finder.result()); if (te) { pData = te->pData(); size = te->size(); @@ -274,7 +274,7 @@ void TiffDecoder::decodeXmp(const TiffEntryBase* object) { // add Exif tag anyway decodeStdTiffEntry(object); - byte const* pData = nullptr; + const byte* pData = nullptr; size_t size = 0; getObjData(pData, size, 0x02bc, ifd0Id, object); if (pData) { @@ -307,7 +307,7 @@ void TiffDecoder::decodeIptc(const TiffEntryBase* object) { } decodedIptc_ = true; // 1st choice: IPTCNAA - byte const* pData = nullptr; + const byte* pData = nullptr; size_t size = 0; getObjData(pData, size, 0x83bb, ifd0Id, object); if (pData) { @@ -327,7 +327,7 @@ void TiffDecoder::decodeIptc(const TiffEntryBase* object) { size = 0; getObjData(pData, size, 0x8649, ifd0Id, object); if (pData) { - byte const* record = nullptr; + const byte* record = nullptr; uint32_t sizeHdr = 0; uint32_t sizeData = 0; if (0 != Photoshop::locateIptcIrb(pData, size, &record, sizeHdr, sizeData)) { diff --git a/src/tiffvisitor_int.hpp b/src/tiffvisitor_int.hpp index 57dfaa7e..8dceb456 100644 --- a/src/tiffvisitor_int.hpp +++ b/src/tiffvisitor_int.hpp @@ -307,7 +307,7 @@ class TiffDecoder : public TiffVisitor { Populates \em pData and \em size with the result. If no matching element is found the function leaves both of these parameters unchanged. */ - void getObjData(byte const*& pData, size_t& size, uint16_t tag, IfdId group, const TiffEntryBase* object); + void getObjData(const byte*& pData, size_t& size, uint16_t tag, IfdId group, const TiffEntryBase* object); //@} // DATA