| 167 | |
| 168 | template <typename BaseMap> |
| 169 | void NetElementMapWrapper<BaseMap>::netLoad(DataStream& ds, NetCompatibilityRules rules) { |
| 170 | if (!checkWithRules(rules)) return; |
| 171 | m_changeData.clear(); |
| 172 | m_changeDataLastVersion = m_netVersion ? m_netVersion->current() : 0; |
| 173 | m_pendingChangeData.clear(); |
| 174 | BaseMap::clear(); |
| 175 | |
| 176 | addChangeData(ClearChange()); |
| 177 | |
| 178 | uint64_t count = ds.readVlqU(); |
| 179 | for (uint64_t i = 0; i < count; ++i) { |
| 180 | auto change = readChange(ds); |
| 181 | addChangeData(change); |
| 182 | applyChange(std::move(change)); |
| 183 | } |
| 184 | |
| 185 | m_updated = true; |
| 186 | } |
| 187 | |
| 188 | template <typename BaseMap> |
| 189 | bool NetElementMapWrapper<BaseMap>::shouldWriteNetDelta(uint64_t fromVersion, NetCompatibilityRules rules) const { |
nothing calls this directly
no test coverage detected