MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / UpdateDataSize

Method UpdateDataSize

lib/mdflib/mdflib/src/dt4block.cpp:37–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void Dt4Block::UpdateDataSize(std::streambuf& buffer) {
38 int64_t last_file_position = GetLastFilePosition(buffer);
39 const auto data_size = last_file_position - data_position_;
40 if (data_size > 0) {
41 block_length_ = 24 + static_cast<uint64_t>(data_size);
42 }
43 MDF_TRACE() << "Updated the last DT block data size. Size: " << data_size;
44}
45
46uint64_t Dt4Block::Write(std::streambuf& buffer) {
47 const auto update = FilePosition() > 0;

Callers 1

FinalizeDtBlocksMethod · 0.80

Calls 1

GetLastFilePositionFunction · 0.85

Tested by

no test coverage detected