@@ -37,7 +37,7 @@ namespace fs = std::filesystem;
3737namespace {
3838// Todo: Can be generalized further - get any tag as a string/long/...
3939// ! Get the Value for a tag within a particular group
40- const Exiv2::Value* getExifValue (Exiv2::Internal::TiffComponent* const pRoot, const uint16_t & tag,
40+ const Exiv2::Value* getExifValue (Exiv2::Internal::TiffComponent* pRoot, const uint16_t & tag,
4141 const Exiv2::Internal::IfdId& group);
4242// ! Get the model name from tag Exif.Image.Model
4343std::string getExifModel (Exiv2::Internal::TiffComponent* pRoot);
@@ -884,7 +884,7 @@ constexpr auto nikonArrayIdx = std::array{
884884 NikonArrayIdx{0x00b7 , " 0101" , 84 , 1 , NA}, // tag 0xb7 in sample image metadata for each version
885885};
886886
887- int nikonSelector (uint16_t tag, const byte* pData, size_t size, TiffComponent* const /* pRoot*/ ) {
887+ int nikonSelector (uint16_t tag, const byte* pData, size_t size, TiffComponent* /* pRoot*/ ) {
888888 if (size < 4 )
889889 return -1 ;
890890
@@ -896,7 +896,7 @@ int nikonSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* c
896896 return it->idx_ ;
897897}
898898
899- DataBuf nikonCrypt (uint16_t tag, const byte* pData, size_t size, TiffComponent* const pRoot) {
899+ DataBuf nikonCrypt (uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot) {
900900 DataBuf buf;
901901
902902 if (size < 4 )
@@ -938,7 +938,7 @@ DataBuf nikonCrypt(uint16_t tag, const byte* pData, size_t size, TiffComponent*
938938 return buf;
939939}
940940
941- int sonyCsSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* const pRoot) {
941+ int sonyCsSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* pRoot) {
942942 std::string model = getExifModel (pRoot);
943943 if (model.empty ())
944944 return -1 ;
@@ -948,7 +948,7 @@ int sonyCsSelector(uint16_t /*tag*/, const byte* /*pData*/, size_t /*size*/, Tif
948948 }
949949 return idx;
950950}
951- int sony2010eSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* const pRoot) {
951+ int sony2010eSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* pRoot) {
952952 static constexpr auto models = std::array{
953953 " SLT-A58" , " SLT-A99" , " ILCE-3000" , " ILCE-3500" , " NEX-3N" , " NEX-5R" , " NEX-5T" ,
954954 " NEX-6" , " VG30E" , " VG900" , " DSC-RX100" , " DSC-RX1" , " DSC-RX1R" , " DSC-HX300" ,
@@ -957,14 +957,14 @@ int sony2010eSelector(uint16_t /*tag*/, const byte* /*pData*/, size_t /*size*/,
957957 return std::find (models.begin (), models.end (), getExifModel (pRoot)) != models.end () ? 0 : -1 ;
958958}
959959
960- int sony2FpSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* const pRoot) {
960+ int sony2FpSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* pRoot) {
961961 // Not valid for models beginning
962962 std::string model = getExifModel (pRoot);
963963 const std::array strs{" SLT-" , " HV" , " ILCA-" };
964964 return std::any_of (strs.begin (), strs.end (), [&model](auto & m) { return startsWith (model, m); }) ? -1 : 0 ;
965965}
966966
967- int sonyMisc2bSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* const pRoot) {
967+ int sonyMisc2bSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* pRoot) {
968968 // From Exiftool: https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/Sony.pm
969969 // > First byte must be 9 or 12 or 13 or 15 or 16 and 4th byte must be 2 (deciphered)
970970
@@ -991,7 +991,7 @@ int sonyMisc2bSelector(uint16_t /*tag*/, const byte* /*pData*/, size_t /*size*/,
991991 }
992992 return -1 ;
993993}
994- int sonyMisc3cSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* const pRoot) {
994+ int sonyMisc3cSelector (uint16_t /* tag*/ , const byte* /* pData*/ , size_t /* size*/ , TiffComponent* pRoot) {
995995 // From Exiftool (Tag 9400c): https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/Sony.pm
996996 // > first byte decoded: 62, 48, 215, 28, 106 respectively
997997
@@ -1023,7 +1023,7 @@ int sonyMisc3cSelector(uint16_t /*tag*/, const byte* /*pData*/, size_t /*size*/,
10231023// *****************************************************************************
10241024// local definitions
10251025namespace {
1026- const Exiv2::Value* getExifValue (Exiv2::Internal::TiffComponent* const pRoot, const uint16_t & tag,
1026+ const Exiv2::Value* getExifValue (Exiv2::Internal::TiffComponent* pRoot, const uint16_t & tag,
10271027 const Exiv2::Internal::IfdId& group) {
10281028 Exiv2::Internal::TiffFinder finder (tag, group);
10291029 if (!pRoot)
@@ -1033,7 +1033,7 @@ const Exiv2::Value* getExifValue(Exiv2::Internal::TiffComponent* const pRoot, co
10331033 return (!te || !te->pValue ()) ? nullptr : te->pValue ();
10341034}
10351035
1036- std::string getExifModel (Exiv2::Internal::TiffComponent* const pRoot) {
1036+ std::string getExifModel (Exiv2::Internal::TiffComponent* pRoot) {
10371037 // Lookup the Exif.Image.Model tag
10381038 const auto value = getExifValue (pRoot, 0x0110 , Exiv2::Internal::ifd0Id);
10391039 return (!value || value->count () == 0 ) ? std::string (" " ) : std::string (value->toString ());
0 commit comments