| 351 | |
| 352 | template <typename Container, typename ReadFunction> |
| 353 | void DataStream::readMapContainer(Container& map, ReadFunction function) { |
| 354 | map.clear(); |
| 355 | size_t size = readVlqU(); |
| 356 | for (size_t i = 0; i < size; ++i) { |
| 357 | typename Container::key_type key; |
| 358 | typename Container::mapped_type mapped; |
| 359 | function(*this, key, mapped); |
| 360 | map.insert(make_pair(std::move(key), std::move(mapped))); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | template <typename Container> |
| 365 | void DataStream::writeContainer(Container const& container) { |
no test coverage detected