| 96 | |
| 97 | template <class... Items> |
| 98 | void deserialize(FileIdentifier file_identifier, Items&... items) { |
| 99 | LoadContext<ReaderImpl> context(static_cast<ReaderImpl*>(this)); |
| 100 | const uint8_t* data = static_cast<ReaderImpl*>(this)->data(); |
| 101 | if (read_file_identifier(data) != file_identifier) { |
| 102 | // Some file identifiers are changed in 7.0, so file identifier mismatches |
| 103 | // are expected during a downgrade from 7.0 to 6.3 |
| 104 | bool expectMismatch = mProtocolVersion.get() >= ProtocolVersion(0x0FDB00B070000000LL) && |
| 105 | currentProtocolVersion() < ProtocolVersion(0x0FDB00B070000000LL); |
| 106 | { |
| 107 | TraceEvent te(expectMismatch ? SevInfo : SevError, "MismatchedFileIdentifier"); |
| 108 | if (expectMismatch) { |
| 109 | te.suppressFor(1.0); |
| 110 | } |
| 111 | te.detail("Expected", file_identifier).detail("Read", read_file_identifier(data)); |
| 112 | } |
| 113 | if (!expectMismatch) { |
| 114 | ASSERT(false); |
| 115 | } |
| 116 | } |
| 117 | load_members(data, context, items...); |
| 118 | } |
| 119 | |
| 120 | template <class Item> |
| 121 | void deserialize(Item& item) { |
no test coverage detected