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

Method read

Engine/source/core/memVolume.cpp:402–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 8

_readMethod · 0.45
calculateCRCStreamMethod · 0.45
openFileMethod · 0.45
_readMethod · 0.45
copyFileMethod · 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