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

Method FlushBlock

Source/DocumentFile.cpp:163–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163bool CDocumentFile::FlushBlock()
164{
165 if (m_pBlockData.empty())
166 return false;
167
168 if (m_iBlockPointer) { // // //
169 Write(reinterpret_cast<unsigned char *>(m_cBlockID.data()), std::size(m_cBlockID) * sizeof(char));
170 Write(reinterpret_cast<unsigned char *>(&m_iBlockVersion), sizeof(m_iBlockVersion));
171 Write(reinterpret_cast<unsigned char *>(&m_iBlockPointer), sizeof(m_iBlockPointer));
172 Write(m_pBlockData.data(), m_iBlockPointer); // // //
173 }
174
175 m_pBlockData.clear(); // // //
176
177 return true;
178}
179
180void CDocumentFile::ValidateFile()
181{

Callers 1

SaveMethod · 0.80

Calls 4

sizeFunction · 0.85
emptyMethod · 0.80
dataMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected