MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / CreateBlock

Method CreateBlock

Source/DocumentFile.cpp:87–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void CDocumentFile::CreateBlock(std::string_view ID, int Version) // // //
88{
89 Assert(ID.size() < BLOCK_HEADER_SIZE); // // //
90 m_cBlockID.fill(0); // // //
91 ID = ID.substr(0, std::size(m_cBlockID) - 1);
92 ID.copy(m_cBlockID.data(), ID.size());
93
94 m_iBlockPointer = 0;
95 m_iBlockSize = 0;
96 m_iBlockVersion = Version & 0xFFFF;
97
98 m_iMaxBlockSize = BLOCK_SIZE;
99
100 m_pBlockData = std::vector<unsigned char>(m_iMaxBlockSize); // // //
101}
102
103void CDocumentFile::ReallocateBlock()
104{

Callers 1

SaveMethod · 0.80

Calls 5

sizeFunction · 0.85
fillMethod · 0.80
copyMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected