MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / deleteClumplet

Method deleteClumplet

src/common/classes/ClumpletWriter.cpp:473–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473void ClumpletWriter::deleteClumplet()
474{
475 const UCHAR* clumplet = getBuffer() + cur_offset;
476 const UCHAR* buffer_end = getBufferEnd();
477
478 // Check for EOF
479 if (clumplet >= buffer_end)
480 {
481 usage_mistake("write past EOF");
482 return;
483 }
484
485 if (buffer_end - clumplet < 2)
486 {
487 // It appears we're erasing EOF marker
488 dynamic_buffer.shrink(cur_offset);
489 }
490 else {
491 dynamic_buffer.removeCount(cur_offset, getClumpletSize(true, true, true));
492 }
493}
494
495bool ClumpletWriter::deleteWithTag(UCHAR tag)
496{

Callers 6

addClumpletsFunction · 0.80
acceptMethod · 0.80
batch_createMethod · 0.80
service_attachMethod · 0.80
removeCurrentMethod · 0.80

Calls 3

getBufferFunction · 0.85
shrinkMethod · 0.45
removeCountMethod · 0.45

Tested by

no test coverage detected