MCPcopy Create free account
hub / github.com/beefytech/Beef / Write

Method Write

IDEHelper/Linker/BlCodeView.cpp:260–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void BlCvStreamWriter::Write(const void* data, int size)
261{
262 while (mCurBlockPos + size > mCurBlockEnd)
263 {
264 int writeBytes = (int)(mCurBlockEnd - mCurBlockPos);
265 if (writeBytes > 0)
266 {
267 memcpy(mCurBlockPos, data, writeBytes);
268 data = (uint8*)data + writeBytes;
269 size -= writeBytes;
270 }
271
272 int newBlock = mMsf->Alloc();
273 mCurStream->mBlocks.Add(newBlock);
274 mCurBlockPos = (uint8*)mMsf->mBlocks[newBlock]->mData;
275 mCurBlockEnd = mCurBlockPos + CV_BLOCK_SIZE;
276 }
277
278 if (size > 0)
279 {
280 memcpy(mCurBlockPos, data, size);
281 mCurBlockPos += size;
282 }
283}
284
285
286void BlCvStreamWriter::Write(ChunkedDataBuffer& buffer)

Callers 15

WriteMemoryCallbackFunction · 0.45
NetManager.cppFile · 0.45
GetEmitSourceMethod · 0.45
WriteBlockMethod · 0.45
FinishMethod · 0.45
AddMethod · 0.45
PopulateIDataMethod · 0.45
PopulateExportDataMethod · 0.45
PopulateCvInfoDataMethod · 0.45
CreateResDataMethod · 0.45
PopulateResDataMethod · 0.45

Calls 5

SetReadPosMethod · 0.80
NextReadPoolMethod · 0.80
AllocMethod · 0.45
AddMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected