picexif: simplify call to ProcessExifDir
authorMirakels <mirakels@openpli.org>
Sun, 25 Oct 2015 11:51:28 +0000 (12:51 +0100)
committerMirakels <mirakels@openpli.org>
Fri, 30 Oct 2015 09:10:28 +0000 (10:10 +0100)
m_exifinfo is a global class var. Within ProcessExifDir() it
is used as such so there is no need to pass it as a function
argument.

lib/gdi/picexif.cpp
lib/gdi/picexif.h

index f86105e..fbb4b97 100644 (file)
@@ -234,7 +234,7 @@ bool Cexif::process_EXIF(unsigned char * CharBuf, unsigned int length)
        }
        unsigned char * LastExifRefd = CharBuf;
 
-       if (!ProcessExifDir(CharBuf+14, CharBuf+6, length-6, m_exifinfo, &LastExifRefd))
+       if (!ProcessExifDir(CharBuf+14, CharBuf+6, length-6, &LastExifRefd))
                return false;
 
        if (m_exifinfo->FocalplaneXRes != 0)
@@ -269,7 +269,7 @@ unsigned long Cexif::Get32u(void * Long)
        return (unsigned long)Get32s(Long) & 0xffffffff;
 }
 
-bool Cexif::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, EXIFINFO * const m_exifinfo, unsigned char ** const LastExifRefdP )
+bool Cexif::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, unsigned char ** const LastExifRefdP )
 {
        int de, a, NumDirEntries;
        unsigned ThumbnailOffset = 0;
@@ -506,7 +506,7 @@ bool Cexif::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase,
                                strcpy(m_szLastError, "Illegal subdirectory link");
                                return false;
                        }
-                       ProcessExifDir(SubdirStart, OffsetBase, ExifLength, m_exifinfo, LastExifRefdP);
+                       ProcessExifDir(SubdirStart, OffsetBase, ExifLength, LastExifRefdP);
                        continue;
                }
        }
@@ -522,7 +522,7 @@ bool Cexif::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase,
                        strcpy(m_szLastError, "Illegal subdirectory link");
                        return false;
                }
-               ProcessExifDir(SubdirStart, OffsetBase, ExifLength, m_exifinfo, LastExifRefdP);
+               ProcessExifDir(SubdirStart, OffsetBase, ExifLength, LastExifRefdP);
         }
 
        if (ThumbnailSize && ThumbnailOffset && m_exifinfo->Thumnailstate)
index 51ea920..8aa0f1d 100644 (file)
@@ -61,12 +61,12 @@ protected:
        bool process_EXIF(unsigned char * CharBuf, unsigned int length);
        void process_COM (const unsigned char * Data, int length);
        void process_SOFn (const unsigned char * Data, int marker);
+       bool ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, unsigned char ** const LastExifRefdP);
        int Get16u(void * Short);
        int Get16m(void * Short);
        long Get32s(void * Long);
        unsigned long Get32u(void * Long);
        double ConvertAnyFormat(void * ValuePtr, int Format);
-       bool ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, EXIFINFO * const pInfo, unsigned         char ** const LastExifRefdP);
        int ExifImageWidth;
        int MotorolaOrder;
        unsigned char * Data;