diff options
-rw-r--r-- | XMPFiles/source/FileHandlers/Basic_Handler.cpp | 12 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/InDesign_Handler.cpp | 10 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/JPEG_Handler.cpp | 4 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp | 16 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/Trivial_Handler.cpp | 10 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp | 22 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/XDCAMFAM_Handler.cpp | 30 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/XDCAM_Handler.cpp | 24 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/IPTC_Support.cpp | 4 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/RIFF.cpp | 30 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp | 14 |
11 files changed, 88 insertions, 88 deletions
diff --git a/XMPFiles/source/FileHandlers/Basic_Handler.cpp b/XMPFiles/source/FileHandlers/Basic_Handler.cpp index d8415c0..96d7285 100644 --- a/XMPFiles/source/FileHandlers/Basic_Handler.cpp +++ b/XMPFiles/source/FileHandlers/Basic_Handler.cpp @@ -52,8 +52,8 @@ void Basic_MetaHandler::UpdateFile ( bool doSafeUpdate ) if ( ! this->needsUpdate ) return; XMP_IO* fileRef = this->parent->ioRef; - XMP_PacketInfo & packetInfo = this->packetInfo; - std::string & xmpPacket = this->xmpPacket; + XMP_PacketInfo & packetInfo_ = this->packetInfo; + std::string & xmpPacket_ = this->xmpPacket; XMP_AbortProc abortProc = this->parent->abortProc; void * abortArg = this->parent->abortArg; @@ -73,12 +73,12 @@ void Basic_MetaHandler::UpdateFile ( bool doSafeUpdate ) XMP_Int64 tempLength = this->xmpFileOffset - this->xmpPrefixSize + this->trailingContentSize; fileRef->Truncate ( tempLength ); - packetInfo.offset = tempLength + this->xmpPrefixSize; + packetInfo_.offset = tempLength + this->xmpPrefixSize; this->NoteXMPInsertion ( fileRef ); fileRef->ToEOF(); this->WriteXMPPrefix ( fileRef ); - fileRef->Write ( xmpPacket.c_str(), (XMP_StringLen)xmpPacket.size() ); + fileRef->Write ( xmpPacket_.c_str(), (XMP_StringLen)xmpPacket_.size() ); this->WriteXMPSuffix ( fileRef ); if ( checkAbort && abortProc(abortArg) ) { XMP_Throw ( "Basic_MetaHandler::UpdateFile - User abort", kXMPErr_UserAbort ); @@ -86,8 +86,8 @@ void Basic_MetaHandler::UpdateFile ( bool doSafeUpdate ) this->RestoreFileEnding ( fileRef ); - this->xmpFileOffset = packetInfo.offset; - this->xmpFileSize = packetInfo.length; + this->xmpFileOffset = packetInfo_.offset; + this->xmpFileSize = packetInfo_.length; this->needsUpdate = false; } // Basic_MetaHandler::UpdateFile diff --git a/XMPFiles/source/FileHandlers/InDesign_Handler.cpp b/XMPFiles/source/FileHandlers/InDesign_Handler.cpp index 01a4d50..c31c2e2 100644 --- a/XMPFiles/source/FileHandlers/InDesign_Handler.cpp +++ b/XMPFiles/source/FileHandlers/InDesign_Handler.cpp @@ -174,7 +174,7 @@ InDesign_MetaHandler::~InDesign_MetaHandler() void InDesign_MetaHandler::CacheFileData() { XMP_IO* fileRef = this->parent->ioRef; - XMP_PacketInfo & packetInfo = this->packetInfo; + XMP_PacketInfo & packetInfo_ = this->packetInfo; XMP_Assert ( kINDD_PageSize == sizeof(InDesignMasterPage) ); static const size_t kBufferSize = (2 * kINDD_PageSize); @@ -287,8 +287,8 @@ void InDesign_MetaHandler::CacheFileData() this->xmpPrefixSize = sizeof(InDesignContigObjMarker) + 4; this->xmpSuffixSize = sizeof(InDesignContigObjMarker); - packetInfo.offset = cobjPos + this->xmpPrefixSize; - packetInfo.length = innerLength; + packetInfo_.offset = cobjPos + this->xmpPrefixSize; + packetInfo_.length = innerLength; XMP_Int64 tcStart = cobjPos + streamLength + (2 * sizeof(InDesignContigObjMarker)); while ( true ) { @@ -319,8 +319,8 @@ void InDesign_MetaHandler::CacheFileData() } if ( this->containsXMP ) { - this->xmpFileOffset = packetInfo.offset; - this->xmpFileSize = packetInfo.length; + this->xmpFileOffset = packetInfo_.offset; + this->xmpFileSize = packetInfo_.length; ReadXMPPacket ( this ); } diff --git a/XMPFiles/source/FileHandlers/JPEG_Handler.cpp b/XMPFiles/source/FileHandlers/JPEG_Handler.cpp index 3448cf1..99a142e 100644 --- a/XMPFiles/source/FileHandlers/JPEG_Handler.cpp +++ b/XMPFiles/source/FileHandlers/JPEG_Handler.cpp @@ -483,8 +483,8 @@ static void TrimFullExifAPP1 ( std::string * exifContents ) TIFF_MemoryReader::TagInfoMap::const_iterator mapEnd = tagMap.end(); for ( ; mapPos != mapEnd; ++mapPos ) { - const TIFF_MemoryReader::TagInfo & tagInfo = mapPos->second; - XMP_Uns32 tagEnd = tempMgr.GetValueOffset ( ifd, tagInfo.id ) + tagInfo.dataLen; + const TIFF_MemoryReader::TagInfo & value = mapPos->second; + XMP_Uns32 tagEnd = tempMgr.GetValueOffset ( ifd, value.id ) + value.dataLen; if ( tagEnd > padOffset ) padOffset = tagEnd; } diff --git a/XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp b/XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp index e3b87d3..3ec4f0f 100644 --- a/XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp +++ b/XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp @@ -604,10 +604,10 @@ static void RemoveTimeStampFromClipName(std::string &clipName) // SonyHDV_MetaHandler::MakeIndexFilePath // ====================================== -bool SonyHDV_MetaHandler::MakeIndexFilePath ( std::string& idxPath, const std::string& rootPath, const std::string& leafName ) +bool SonyHDV_MetaHandler::MakeIndexFilePath ( std::string& idxPath, const std::string& rootPath_, const std::string& leafName ) { std::string tempPath; - tempPath = rootPath; + tempPath = rootPath_; tempPath += kDirChar; tempPath += "VIDEO"; tempPath += kDirChar; @@ -626,8 +626,8 @@ bool SonyHDV_MetaHandler::MakeIndexFilePath ( std::string& idxPath, const std::s // Scanning code taken from SonyHDV_CheckFormat // Can be isolated to a separate function. - std::string clipName = leafName; - RemoveTimeStampFromClipName(clipName); + std::string clipName_ = leafName; + RemoveTimeStampFromClipName(clipName_); Host_IO::AutoFolder aFolder; std::string childName; @@ -639,10 +639,10 @@ bool SonyHDV_MetaHandler::MakeIndexFilePath ( std::string& idxPath, const std::s if ( childLen < 4 ) continue; MakeUpperCase ( &childName ); if ( childName.compare ( childLen-4, 4, ".IDX" ) != 0 ) continue; - if ( childName.compare ( 0, clipName.size(), clipName ) == 0 ) { + if ( childName.compare ( 0, clipName_.size(), clipName_ ) == 0 ) { found = true; - clipName = childName; - clipName.erase ( childLen-4 ); + clipName_ = childName; + clipName_.erase ( childLen-4 ); } } aFolder.Close(); @@ -650,7 +650,7 @@ bool SonyHDV_MetaHandler::MakeIndexFilePath ( std::string& idxPath, const std::s idxPath = tempPath; idxPath += kDirChar; - idxPath += clipName; + idxPath += clipName_; idxPath += ".IDX"; return true; diff --git a/XMPFiles/source/FileHandlers/Trivial_Handler.cpp b/XMPFiles/source/FileHandlers/Trivial_Handler.cpp index ac8b468..06e9c41 100644 --- a/XMPFiles/source/FileHandlers/Trivial_Handler.cpp +++ b/XMPFiles/source/FileHandlers/Trivial_Handler.cpp @@ -48,12 +48,12 @@ void Trivial_MetaHandler::UpdateFile ( bool doSafeUpdate ) if ( ! this->needsUpdate ) return; XMP_IO* fileRef = this->parent->ioRef; - XMP_PacketInfo & packetInfo = this->packetInfo; - std::string & xmpPacket = this->xmpPacket; + XMP_PacketInfo & packetInfo_ = this->packetInfo; + std::string & xmpPacket_ = this->xmpPacket; - fileRef->Seek ( packetInfo.offset, kXMP_SeekFromStart ); - fileRef->Write ( xmpPacket.c_str(), packetInfo.length ); - XMP_Assert ( xmpPacket.size() == (size_t)packetInfo.length ); + fileRef->Seek ( packetInfo_.offset, kXMP_SeekFromStart ); + fileRef->Write ( xmpPacket_.c_str(), packetInfo_.length ); + XMP_Assert ( xmpPacket_.size() == (size_t)packetInfo_.length ); this->needsUpdate = false; diff --git a/XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp b/XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp index cc8b829..25c83fc 100644 --- a/XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp +++ b/XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp @@ -305,29 +305,29 @@ void XDCAMEX_MetaHandler::MakeLegacyDigest ( std::string * digestStr ) if ( this->clipMetadata == 0 ) return; // Bail if we don't have any legacy XML. XMP_Assert ( this->expat != 0 ); - XMP_StringPtr xdcNS = this->xdcNS.c_str(); + XMP_StringPtr xdcNS_ = this->xdcNS.c_str(); XML_NodePtr legacyContext, legacyProp; - legacyContext = this->clipMetadata->GetNamedElement ( xdcNS, "Access" ); + legacyContext = this->clipMetadata->GetNamedElement ( xdcNS_, "Access" ); if ( legacyContext == 0 ) return; MD5_CTX context; unsigned char digestBin [16]; MD5Init ( &context ); - legacyProp = legacyContext->GetNamedElement ( xdcNS, "Creator" ); + legacyProp = legacyContext->GetNamedElement ( xdcNS_, "Creator" ); if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() && (! legacyProp->content.empty()) ) { const XML_Node * xmlValue = legacyProp->content[0]; MD5Update ( &context, (XMP_Uns8*)xmlValue->value.c_str(), (unsigned int)xmlValue->value.size() ); } - legacyProp = legacyContext->GetNamedElement ( xdcNS, "CreationDate" ); + legacyProp = legacyContext->GetNamedElement ( xdcNS_, "CreationDate" ); if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() && (! legacyProp->content.empty()) ) { const XML_Node * xmlValue = legacyProp->content[0]; MD5Update ( &context, (XMP_Uns8*)xmlValue->value.c_str(), (unsigned int)xmlValue->value.size() ); } - legacyProp = legacyContext->GetNamedElement ( xdcNS, "LastUpdateDate" ); + legacyProp = legacyContext->GetNamedElement ( xdcNS_, "LastUpdateDate" ); if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() && (! legacyProp->content.empty()) ) { const XML_Node * xmlValue = legacyProp->content[0]; MD5Update ( &context, (XMP_Uns8*)xmlValue->value.c_str(), (unsigned int)xmlValue->value.size() ); @@ -700,14 +700,14 @@ void XDCAMEX_MetaHandler::GetTakeDuration ( const std::string & takeURI, std::st // ======================================== bool XDCAMEX_MetaHandler::GetMediaProMetadata ( SXMPMeta * xmpObjPtr, - const std::string& clipUMID, + const std::string& clipUMID_, bool digestFound ) { // Build a directory string to the MEDIAPRO file. std::string mediaproPath; this->MakeMediaproPath ( &mediaproPath ); - return XDCAM_Support::GetMediaProLegacyMetadata ( xmpObjPtr, clipUMID, mediaproPath, digestFound ); + return XDCAM_Support::GetMediaProLegacyMetadata ( xmpObjPtr, clipUMID_, mediaproPath, digestFound ); } // XDCAMEX_MetaHandler::GetMediaProMetadata @@ -715,7 +715,7 @@ bool XDCAMEX_MetaHandler::GetMediaProMetadata ( SXMPMeta * xmpObjPtr, // XDCAMEX_MetaHandler::GetTakeUMID // ================================ -void XDCAMEX_MetaHandler::GetTakeUMID ( const std::string& clipUMID, +void XDCAMEX_MetaHandler::GetTakeUMID ( const std::string& clipUMID_, std::string& takeUMID, std::string& takeXMLURI ) { @@ -804,7 +804,7 @@ void XDCAMEX_MetaHandler::GetTakeUMID ( const std::string& clipUMID, XMP_StringPtr compUMID = componentElement->GetAttrValue ( "umid" ); - if ( (compUMID != 0) && (compUMID == clipUMID) ) { + if ( (compUMID != 0) && (compUMID == clipUMID_) ) { takeUMID = umid; takeXMLURI = uri; break; @@ -886,7 +886,7 @@ void XDCAMEX_MetaHandler::ProcessXMP() // Check the legacy digest. - XMP_StringPtr legacyNS = this->legacyNS.c_str(); + XMP_StringPtr legacyNS_ = this->legacyNS.c_str(); this->clipMetadata = rootElem; // ! Save the NonRealTimeMeta pointer for other use. std::string oldDigest, newDigest; @@ -899,7 +899,7 @@ void XDCAMEX_MetaHandler::ProcessXMP() // If we get here we need find and import the actual legacy elements using the current namespace. // Either there is no old digest in the XMP, or the digests differ. In the former case keep any // existing XMP, in the latter case take new legacy values. - this->containsXMP = XDCAM_Support::GetLegacyMetadata ( &this->xmpObj, rootElem, legacyNS, digestFound, thisUMID ); + this->containsXMP = XDCAM_Support::GetLegacyMetadata ( &this->xmpObj, rootElem, legacyNS_, digestFound, thisUMID ); // If this clip is part of a take, add the take number to the relation field, and get the // duration from the take metadata. diff --git a/XMPFiles/source/FileHandlers/XDCAMFAM_Handler.cpp b/XMPFiles/source/FileHandlers/XDCAMFAM_Handler.cpp index 98e16cc..8821d28 100644 --- a/XMPFiles/source/FileHandlers/XDCAMFAM_Handler.cpp +++ b/XMPFiles/source/FileHandlers/XDCAMFAM_Handler.cpp @@ -249,22 +249,22 @@ void XDCAMFAM_MetaHandler::FillAssociatedResources( std::vector<std::string> * XMP_VarString clipPath = rootPath + kDirChar + "Clip" + kDirChar ; size_t oldCount = resourceList->size(); - XMP_VarString regExp; + XMP_VarString regExp1; XMP_StringVector regExpVec; - regExp = "^" + clipName + ".MXF$"; - regExpVec.push_back ( regExp ); - regExp = "^" + clipName + "M\\d\\d.XML$"; - regExpVec.push_back ( regExp ); + regExp1 = "^" + clipName + ".MXF$"; + regExpVec.push_back ( regExp1 ); + regExp1 = "^" + clipName + "M\\d\\d.XML$"; + regExpVec.push_back ( regExp1 ); if ( this->isXDStyle ) { - regExp = "^" + clipName + "R\\d\\d.BIM$"; - regExpVec.push_back ( regExp ); + regExp1 = "^" + clipName + "R\\d\\d.BIM$"; + regExpVec.push_back ( regExp1 ); } else { - regExp = "^" + clipName + "M\\d\\d.KLV$"; - regExpVec.push_back ( regExp ); + regExp1 = "^" + clipName + "M\\d\\d.KLV$"; + regExpVec.push_back ( regExp1 ); } IOUtils::GetMatchingChildren ( *resourceList, clipPath, regExpVec, false, true, true ); PackageFormat_Support::AddResourceIfExists( resourceList, this->sidecarPath); @@ -276,8 +276,8 @@ void XDCAMFAM_MetaHandler::FillAssociatedResources( std::vector<std::string> * //Get the files Under Sub folder clipPath = rootPath + kDirChar + "Sub" + kDirChar ; regExpVec.clear(); - regExp = "^" + clipName + "S\\d\\d.MXF$"; - regExpVec.push_back ( regExp ); + regExp1 = "^" + clipName + "S\\d\\d.MXF$"; + regExpVec.push_back ( regExp1 ); oldCount = resourceList->size(); IOUtils::GetMatchingChildren ( *resourceList, clipPath, regExpVec, false, true, true ); // Add Sub folder if no file inside this, was added. @@ -292,11 +292,11 @@ void XDCAMFAM_MetaHandler::FillAssociatedResources( std::vector<std::string> * clipPath = rootPath + kDirChar + "Local" + kDirChar ; regExpVec.clear(); // ClipInfo file - regExp = "^" + clipName + "C\\d\\d.SMI$"; - regExpVec.push_back ( regExp ); + regExp1 = "^" + clipName + "C\\d\\d.SMI$"; + regExpVec.push_back ( regExp1 ); // Picture pointer file - regExp = "^" + clipName + "I\\d\\d.PPN$"; - regExpVec.push_back ( regExp ); + regExp1 = "^" + clipName + "I\\d\\d.PPN$"; + regExpVec.push_back ( regExp1 ); oldCount = resourceList->size(); IOUtils::GetMatchingChildren ( *resourceList, clipPath, regExpVec, false, true, true ); // Add Local folder if no file inside this, was added. diff --git a/XMPFiles/source/FileHandlers/XDCAM_Handler.cpp b/XMPFiles/source/FileHandlers/XDCAM_Handler.cpp index 354d57c..2b8fed1 100644 --- a/XMPFiles/source/FileHandlers/XDCAM_Handler.cpp +++ b/XMPFiles/source/FileHandlers/XDCAM_Handler.cpp @@ -254,29 +254,29 @@ void XDCAM_MetaHandler::MakeLegacyDigest ( std::string * digestStr ) if ( this->clipMetadata == 0 ) return; // Bail if we don't have any legacy XML. XMP_Assert ( this->expat != 0 ); - XMP_StringPtr xdcNS = this->xdcNS.c_str(); + XMP_StringPtr xdcNS_ = this->xdcNS.c_str(); XML_NodePtr legacyContext, legacyProp; - legacyContext = this->clipMetadata->GetNamedElement ( xdcNS, "Access" ); + legacyContext = this->clipMetadata->GetNamedElement ( xdcNS_, "Access" ); if ( legacyContext == 0 ) return; MD5_CTX context; unsigned char digestBin [16]; MD5Init ( &context ); - legacyProp = legacyContext->GetNamedElement ( xdcNS, "Creator" ); + legacyProp = legacyContext->GetNamedElement ( xdcNS_, "Creator" ); if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() && (! legacyProp->content.empty()) ) { const XML_Node * xmlValue = legacyProp->content[0]; MD5Update ( &context, (XMP_Uns8*)xmlValue->value.c_str(), (unsigned int)xmlValue->value.size() ); } - legacyProp = legacyContext->GetNamedElement ( xdcNS, "CreationDate" ); + legacyProp = legacyContext->GetNamedElement ( xdcNS_, "CreationDate" ); if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() && (! legacyProp->content.empty()) ) { const XML_Node * xmlValue = legacyProp->content[0]; MD5Update ( &context, (XMP_Uns8*)xmlValue->value.c_str(), (unsigned int)xmlValue->value.size() ); } - legacyProp = legacyContext->GetNamedElement ( xdcNS, "LastUpdateDate" ); + legacyProp = legacyContext->GetNamedElement ( xdcNS_, "LastUpdateDate" ); if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() && (! legacyProp->content.empty()) ) { const XML_Node * xmlValue = legacyProp->content[0]; MD5Update ( &context, (XMP_Uns8*)xmlValue->value.c_str(), (unsigned int)xmlValue->value.size() ); @@ -312,22 +312,22 @@ void XDCAM_MetaHandler::CleanupLegacyXML() // XDCAM_MetaHandler::readXMLFile // ================================ -void XDCAM_MetaHandler::readXMLFile( XMP_StringPtr filePath, ExpatAdapter* &expat ) +void XDCAM_MetaHandler::readXMLFile( XMP_StringPtr filePath, ExpatAdapter* &expat_ ) { Host_IO::FileRef hostRef = Host_IO::Open ( filePath, Host_IO::openReadOnly ); if ( hostRef == Host_IO::noFileRef ) return; // The open failed. XMPFiles_IO xmlFile ( hostRef, filePath, Host_IO::openReadOnly ); - expat = XMP_NewExpatAdapter ( ExpatAdapter::kUseLocalNamespaces ); - if ( expat == 0 ) XMP_Throw ( "XDCAM_MetaHandler: Can't create Expat adapter", kXMPErr_NoMemory ); + expat_ = XMP_NewExpatAdapter ( ExpatAdapter::kUseLocalNamespaces ); + if ( expat_ == 0 ) XMP_Throw ( "XDCAM_MetaHandler: Can't create Expat adapter", kXMPErr_NoMemory ); XMP_Uns8 buffer [64*1024]; while ( true ) { XMP_Int32 ioCount = xmlFile.Read ( buffer, sizeof(buffer) ); if ( ioCount == 0 ) break; - expat->ParseBuffer ( buffer, ioCount, false /* not the end */ ); + expat_->ParseBuffer ( buffer, ioCount, false /* not the end */ ); } - expat->ParseBuffer ( 0, 0, true ); // End the parse. + expat_->ParseBuffer ( 0, 0, true ); // End the parse. xmlFile.Close(); } @@ -574,7 +574,7 @@ void XDCAM_MetaHandler::ProcessXMP() // Check the legacy digest. - XMP_StringPtr legacyNS = this->legacyNS.c_str(); + XMP_StringPtr legacyNS_ = this->legacyNS.c_str(); this->clipMetadata = rootElem; // ! Save the NonRealTimeMeta pointer for other use. @@ -589,7 +589,7 @@ void XDCAM_MetaHandler::ProcessXMP() // Either there is no old digest in the XMP, or the digests differ. In the former case keep any // existing XMP, in the latter case take new legacy values. - this->containsXMP = XDCAM_Support::GetLegacyMetadata ( &this->xmpObj, rootElem, legacyNS, digestFound, umid ); + this->containsXMP = XDCAM_Support::GetLegacyMetadata ( &this->xmpObj, rootElem, legacyNS_, digestFound, umid ); this->containsXMP |= GetMediaProMetadata ( &this->xmpObj, umid, digestFound ); CleanupAndExit diff --git a/XMPFiles/source/FormatSupport/IPTC_Support.cpp b/XMPFiles/source/FormatSupport/IPTC_Support.cpp index d18ff6a..1319bf4 100644 --- a/XMPFiles/source/FormatSupport/IPTC_Support.cpp +++ b/XMPFiles/source/FormatSupport/IPTC_Support.cpp @@ -159,10 +159,10 @@ void IPTC_Manager::ParseMemoryDataSets ( const void* data, XMP_Uns32 length, boo { // Get rid of any existing data. - DataSetMap::iterator dsPos = this->dataSets.begin(); + DataSetMap::iterator dsPos0 = this->dataSets.begin(); DataSetMap::iterator dsEnd = this->dataSets.end(); - for ( ; dsPos != dsEnd; ++dsPos ) this->DisposeLooseValue ( dsPos->second ); + for ( ; dsPos0 != dsEnd; ++dsPos0 ) this->DisposeLooseValue ( dsPos0->second ); this->dataSets.clear(); diff --git a/XMPFiles/source/FormatSupport/RIFF.cpp b/XMPFiles/source/FormatSupport/RIFF.cpp index 88c1260..20baabc 100644 --- a/XMPFiles/source/FormatSupport/RIFF.cpp +++ b/XMPFiles/source/FormatSupport/RIFF.cpp @@ -141,12 +141,12 @@ Chunk* getChunk ( ContainerChunk* parent, RIFF_MetaHandler* handler ) // BASE CLASS CHUNK /////////////////////////////////////////////// // ad hoc creation -Chunk::Chunk( ContainerChunk* parent, ChunkType c, XMP_Uns32 id ) +Chunk::Chunk( ContainerChunk* parent_, ChunkType c, XMP_Uns32 id_ ) { this->hasChange = false; this->chunkType = c; // base class assumption - this->parent = parent; - this->id = id; + this->parent = parent_; + this->id = id_; this->oldSize = 0; this->newSize = 8; this->oldPos = 0; // inevitable for ad-hoc @@ -162,10 +162,10 @@ Chunk::Chunk( ContainerChunk* parent, ChunkType c, XMP_Uns32 id ) } // parsing creation -Chunk::Chunk( ContainerChunk* parent, RIFF_MetaHandler* handler, bool skip, ChunkType c ) +Chunk::Chunk( ContainerChunk* parent_, RIFF_MetaHandler* handler, bool skip, ChunkType c ) { chunkType = c; // base class assumption - this->parent = parent; + this->parent = parent_; this->oldSize = 0; this->hasChange = false; // [2414649] valid assumption at creation time @@ -179,11 +179,11 @@ Chunk::Chunk( ContainerChunk* parent, RIFF_MetaHandler* handler, bool skip, Chun // Make sure the size is within expected bounds. XMP_Int64 chunkEnd = this->oldPos + this->oldSize; XMP_Int64 chunkLimit = handler->oldFileSize; - if ( parent != 0 ) chunkLimit = parent->oldPos + parent->oldSize; + if ( parent_ != 0 ) chunkLimit = parent_->oldPos + parent_->oldSize; if ( chunkEnd > chunkLimit ) { bool isUpdate = XMP_OptionIsSet ( handler->parent->openFlags, kXMPFiles_OpenForUpdate ); bool repairFile = XMP_OptionIsSet ( handler->parent->openFlags, kXMPFiles_OpenRepairFile ); - if ( (! isUpdate) || (repairFile && (parent == 0)) ) { + if ( (! isUpdate) || (repairFile && (parent_ == 0)) ) { this->oldSize = chunkLimit - this->oldPos; } else { XMP_Throw ( "Bad RIFF chunk size", kXMPErr_BadFileFormat ); @@ -237,16 +237,16 @@ Chunk::~Chunk() // CONTAINER CHUNK ///////////////////////////////////////////////// // a) creation // [2376832] expectedSize - minimum padding "parking size" to use, if not available append to end -ContainerChunk::ContainerChunk( ContainerChunk* parent, XMP_Uns32 id, XMP_Uns32 containerType ) : Chunk( NULL /* !! */, chunk_CONTAINER, id ) +ContainerChunk::ContainerChunk( ContainerChunk* parent_, XMP_Uns32 id_, XMP_Uns32 containerType ) : Chunk( NULL /* !! */, chunk_CONTAINER, id_ ) { // accept no unparented ConatinerChunks - XMP_Enforce( parent != NULL ); + XMP_Enforce( parent_ != NULL ); this->containerType = containerType; this->newSize = 12; - this->parent = parent; + this->parent = parent_; - chunkVect* siblings = &parent->children; + chunkVect* siblings = &parent_->children; // add at end. ( oldSize==0 will flag optimization later in the process) siblings->push_back( this ); @@ -597,8 +597,8 @@ std::string ContainerChunk::toString(XMP_Uns8 level ) XMP_Int64 offset= 12; // compute offsets, just for informational purposes // (actually only correct for first chunk) - char buffer[256]; - snprintf( buffer, 255, "%.4s:%.4s, " + char buffer0[256]; + snprintf( buffer0, 255, "%.4s:%.4s, " "oldSize: 0x%8llX, " "newSize: 0x%.8llX, " "oldPos: 0x%.8llX\n", @@ -607,7 +607,7 @@ std::string ContainerChunk::toString(XMP_Uns8 level ) (long long unsigned)this->newSize, (long long unsigned)this->oldPos ); - std::string r(buffer); + std::string r(buffer0); chunkVectIter iter; for( iter = this->children.begin(); iter != this->children.end(); iter++ ) { @@ -859,7 +859,7 @@ JunkChunk::JunkChunk( ContainerChunk* parent_, XMP_Int64 size ) : Chunk( parent_ } // b) parsing -JunkChunk::JunkChunk( ContainerChunk* parent, RIFF_MetaHandler* handler ) : Chunk( parent, handler, true, chunk_JUNK ) +JunkChunk::JunkChunk( ContainerChunk* parent_, RIFF_MetaHandler* handler ) : Chunk( parent_, handler, true, chunk_JUNK ) { chunkType = chunk_JUNK; } diff --git a/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp index 6bea3d3..8d74a53 100644 --- a/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp +++ b/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp @@ -141,7 +141,7 @@ void INFOMetadata::parse( const XMP_Uns8* input, XMP_Uns64 size ) XMP_Uns64 INFOMetadata::serialize( XMP_Uns8** outBuffer ) { - XMP_Uns64 size = 0; + XMP_Uns64 ssize = 0; if( outBuffer != NULL ) { @@ -160,16 +160,16 @@ XMP_Uns64 INFOMetadata::serialize( XMP_Uns8** outBuffer ) chunkSize++; } - size += chunkSize; + ssize += chunkSize; } - size += kSizeChunkType; // add size of type "INFO" + ssize += kSizeChunkType; // add size of type "INFO" - if( size > 0 ) + if( ssize > 0 ) { - XMP_Uns8* buffer = new XMP_Uns8[static_cast<size_t>(size)]; // output buffer + XMP_Uns8* buffer = new XMP_Uns8[static_cast<size_t>(ssize)]; // output buffer - memset( buffer, 0, static_cast<size_t>(size) ); + memset( buffer, 0, static_cast<size_t>(ssize) ); const BigEndian& BE = BigEndian::getInstance(); const LittleEndian& LE = LittleEndian::getInstance(); @@ -245,7 +245,7 @@ XMP_Uns64 INFOMetadata::serialize( XMP_Uns8** outBuffer ) XMP_Throw ( "Invalid buffer", kXMPErr_InternalFailure ); } - return size; + return ssize; } //----------------------------------------------------------------------------- |