| 302 | } |
| 303 | |
| 304 | uint32_t BookMetadataCache::writeTocEntry(HalFile& file, const TocEntry& entry) const { |
| 305 | const uint32_t pos = file.position(); |
| 306 | serialization::writeString(file, entry.title); |
| 307 | serialization::writeString(file, entry.href); |
| 308 | serialization::writeString(file, entry.anchor); |
| 309 | serialization::writePod(file, entry.level); |
| 310 | serialization::writePod(file, entry.spineIndex); |
| 311 | return pos; |
| 312 | } |
| 313 | |
| 314 | // Note: for the LUT to be accurate, this **MUST** be called for all spine items before `addTocEntry` is ever called |
| 315 | // this is because in this function we're marking positions of the items |
nothing calls this directly
no test coverage detected