MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / read

Method read

Engine/source/core/memVolume.cpp:399–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397 }
398
399 U32 MemFile::read(void* dst, U32 size)
400 {
401 if (mStatus != Open && mStatus != EndOfFile)
402 return 0;
403
404 U32 copyAmount = getMin(size, mFileData->mFileSize - mCurrentPos);
405 dMemcpy(dst, (U8*) mFileData->mBuffer + mCurrentPos, copyAmount);
406 mCurrentPos += copyAmount;
407 mFileData->mLastAccess = Time::getCurrentTime();
408 if (mCurrentPos == mFileData->mFileSize)
409 mStatus = EndOfFile;
410 return copyAmount;
411 }
412
413 U32 MemFile::write(const void* src, U32 size)
414 {

Callers 7

_readMethod · 0.45
calculateCRCStreamMethod · 0.45
openFileMethod · 0.45
_readMethod · 0.45
findByPatternMethod · 0.45
ReadFileFunction · 0.45
readDemoStartBlockMethod · 0.45

Calls 4

dMemcpyFunction · 0.50
getCurrentTimeFunction · 0.50
sizeMethod · 0.45
getAttributesMethod · 0.45

Tested by

no test coverage detected