Implement use_byte() as per the spec.

This commit is contained in:
King_DuckZ 2020-03-21 21:05:23 +01:00
parent 54371b62f8
commit a98539aa06
2 changed files with 6 additions and 0 deletions

View file

@ -76,6 +76,7 @@ public:
std::size_t index() const { return m_index; }
std::string title() const;
std::size_t available_blocks() const;
uint32_t use_byte() const;
uint16_t link_order() const;
CountryCode country_code() const;
std::string product_code() const;

View file

@ -204,6 +204,11 @@ std::size_t BasicBlock<Const>::available_blocks() const {
return m_toc_entry.data()[0];
}
template <bool Const>
uint32_t BasicBlock<Const>::use_byte() const {
return read_as<uint32_t>(m_toc_entry, 0x04);
}
template <bool Const>
uint16_t BasicBlock<Const>::link_order() const {
return read_as<uint16_t>(m_toc_entry, 0x08);