if(it->first!=NLMAXFILE_APP_DATA_HEADER_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_HEADER_CHUNK_ID);disown();return;}
if(it->first!=NLMAXFILE_APP_DATA_ENTRY_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_ENTRY_CHUNK_ID);disown();return;}
if(Chunks.begin()->first!=NLMAXFILE_APP_DATA_HEADER_CHUNK_ID){nlerror("Bad id %x, expected %x",(uint32)Chunks.begin()->first,NLMAXFILE_APP_DATA_HEADER_CHUNK_ID);return;}// Cannot happen, because we won't have local ownership if parsing failed
deleteChunks.begin()->second;// Delete the header chunk, since we own it
if(!ChunksOwnsPointers&&(Chunks.size()!=(m_Entries.size()+1))){nlerror("Not built");return;}// If chunks is not the owner, built chunks must match the parsed data
if(it->first!=NLMAXFILE_APP_DATA_ENTRY_KEY_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_ENTRY_KEY_CHUNK_ID);disown();return;}
if(it->first!=NLMAXFILE_APP_DATA_ENTRY_KEY_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_ENTRY_KEY_CHUNK_ID);disown();return;}
m_Key=static_cast<CAppDataEntryKey*>(it->second);
m_Key=static_cast<CAppDataEntryKey*>(it->second);
++it;
if(it->first!=NLMAXFILE_APP_DATA_ENTRY_VALUE_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_ENTRY_VALUE_CHUNK_ID);disown();return;}
m_Value=static_cast<CStorageRaw*>(it->second);
// ChunksOwnsPointers = false;
++it;
}
if(it->first!=NLMAXFILE_APP_DATA_ENTRY_VALUE_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_ENTRY_VALUE_CHUNK_ID);disown();return;}
m_Value=static_cast<CStorageRaw*>(it->second);
// ChunksOwnsPointers = false;
nlassert(ChunksOwnsPointers);// Never set false here
}
}
voidCAppDataEntry::clean()
voidCAppDataEntry::clean()
{
{
nlassert(false);
// CStorageContainer::clean();
// CStorageContainer::clean();
// if (ChunksOwnsPointers) { nlwarning("Not parsed"); return; }
// if (ChunksOwnsPointers) { nlwarning("Not parsed"); return; }
// Nothing to do here!
// Nothing to do here!
@ -296,6 +374,7 @@ void CAppDataEntry::clean()
voidCAppDataEntry::build(uint16version)
voidCAppDataEntry::build(uint16version)
{
{
nlassert(false);
// if (ChunksOwnsPointers) { nlwarning("Not parsed"); return; }
// if (ChunksOwnsPointers) { nlwarning("Not parsed"); return; }