| 87 | } |
| 88 | |
| 89 | inline bool WriteVersion(fstream & f, uint32_t version) |
| 90 | { |
| 91 | static_assert(kHeaderSize == sizeof(version)); |
| 92 | version = SwapIfBigEndianMacroBased(version); |
| 93 | f.write(reinterpret_cast<char const *>(&version), kHeaderSize); |
| 94 | return f.good() && f.flush().good(); |
| 95 | } |
| 96 | |
| 97 | inline bool ReadVersion(fstream & f, uint32_t & version) |
| 98 | { |
no test coverage detected