Initial
This commit is contained in:
15
sample/DataChnk.cpp
Normal file
15
sample/DataChnk.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <sample/datachnk.hpp>
|
||||
|
||||
bool DataChunk::read(FileHandle &handle)
|
||||
{
|
||||
if(!mChunkID.read(handle))return false;
|
||||
if(!handle.read((BYTE*)&mLengthData,sizeof(mLengthData)))return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DataChunk::write(MemFile &memFile)const
|
||||
{
|
||||
if(!mChunkID.write(memFile))return false;
|
||||
if(!memFile.write((char*)&mLengthData,sizeof(mLengthData)))return false;
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user