EbmlMaster.cpp: unwrap huge if; fix indentation

This commit is contained in:
Moritz Bunkus 2015-10-20 14:02:29 +02:00
parent ababb64e0c
commit 12b560adc2

View File

@ -398,8 +398,9 @@ void EbmlMaster::Sort()
*/
void EbmlMaster::Read(EbmlStream & inDataStream, const EbmlSemanticContext & sContext, int & UpperEltFound, EbmlElement * & FoundElt, bool AllowDummyElt, ScopeMode ReadFully)
{
if (ReadFully != SCOPE_NO_DATA)
{
if (ReadFully == SCOPE_NO_DATA)
return;
EbmlElement * ElementLevelA;
// remove all existing elements, including the mandatory ones...
size_t Index;
@ -480,7 +481,8 @@ void EbmlMaster::Read(EbmlStream & inDataStream, const EbmlSemanticContext & sCo
FoundElt = ElementLevelA;
}
}
processCrc:
processCrc:
EBML_MASTER_ITERATOR Itr, CrcItr;
for (Itr = ElementList.begin(); Itr != ElementList.end();) {
if ((EbmlId)(*(*Itr)) == EBML_ID(EbmlCrc32)) {
@ -492,13 +494,14 @@ void EbmlMaster::Read(EbmlStream & inDataStream, const EbmlSemanticContext & sCo
}
++Itr;
}
if (bChecksumUsed)
{
delete *CrcItr;
Remove(CrcItr);
}
SetValueIsSet();
}
}
void EbmlMaster::Remove(size_t Index)