std::size_t MdfBlock::ReadBool(std::FILE *file, bool &dest) const { uint16_t temp = 0; auto bytes = ReadNumber(file, temp); dest = temp != 0; return bytes; } std::size_t MdfBlock::WriteBool(std::FILE *file, bool value) const { const uint16_t temp = value ? 1 : 0; return WriteNumber(file, temp); } */
| 496 | } |
| 497 | */ |
| 498 | void MdfBlock::ReadMdComment(std::streambuf& buffer, size_t index_md) { |
| 499 | if (!md_comment_ && Link(index_md) > 0) { |
| 500 | md_comment_ = std::make_unique<Md4Block>(); |
| 501 | md_comment_->Init(*this); |
| 502 | SetFilePosition(buffer, Link(index_md)); |
| 503 | md_comment_->Read(buffer); |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | void MdfBlock::WriteMdComment(std::streambuf& buffer, size_t index_md) { |
| 508 | if (md_comment_ && Link(index_md) == 0) { |
nothing calls this directly
no test coverage detected