Correction as discussed in commit review (see also issue #4008)

This commit is contained in:
Hombre57
2017-08-10 00:50:26 +02:00
parent f23be9345c
commit 1a296b763f
16 changed files with 310 additions and 273 deletions

View File

@@ -290,7 +290,7 @@ bool TagDirectory::CPBDump (const Glib::ustring &commFName, const Glib::ustring
kf->set_double ("Common Data", "Shutter", cfs->shutter);
kf->set_double ("Common Data", "FocalLength", cfs->focalLen);
kf->set_integer ("Common Data", "ISO", cfs->iso);
kf->set_integer ("Common Data", "IsHDR", cfs->isHDR);
kf->set_boolean ("Common Data", "IsHDR", cfs->isHDR);
kf->set_boolean ("Common Data", "IsPixelShift", cfs->isPixelShift);
kf->set_string ("Common Data", "Lens", cfs->lens);
kf->set_string ("Common Data", "Make", cfs->camMake);
@@ -2881,10 +2881,8 @@ TagDirectory* ExifManager::parseTIFF (bool skipIgnored)
{
if (!rml) {
rml = new rtengine::RawMetaDataLocation(0);
TagDirectory* tagDir = parse (skipIgnored);
delete rml;
return tagDir;
std::unique_ptr<rtengine::RawMetaDataLocation> rml(new rtengine::RawMetaDataLocation(0));
return parse (skipIgnored);
} else {
return parse (skipIgnored);
}

View File

@@ -49,7 +49,7 @@ enum ActionCode {
};
enum ByteOrder {UNKNOWN = 0, INTEL = 0x4949, MOTOROLA = 0x4D4D};
#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__
const enum ByteOrder HOSTORDER = INTEL;
const ByteOrder HOSTORDER = INTEL;
#else
const enum ByteOrder HOSTORDER = MOTOROLA;
#endif
@@ -312,6 +312,7 @@ class ExifManager
Tag* saveCIFFMNTag (TagDirectory* root, int len, const char* name);
TagDirectory* parseIFD (int ifdOffset, bool skipIgnored);
void parseCIFF (int length, TagDirectory* root);
public:
FILE* f;
@@ -340,7 +341,6 @@ public:
TagDirectory* parseJPEG (int offset = 0); // offset: to extract exif data from a embedded preview/thumbnail
TagDirectory* parseTIFF (bool skipIgnored = true);
TagDirectory* parseCIFF ();
void parseCIFF (int length, TagDirectory* root);
/// @brief Get default tag for TIFF
/// @param forthis The byte order will be taken from the given directory.