| 342 | |
| 343 | template <class TSink> |
| 344 | void Save(TSink & sink) |
| 345 | { |
| 346 | // Not necessary assumption that 3-bytes varuint |
| 347 | // is enough for triangle chains count. |
| 348 | size_t const count = m_buffers.size(); |
| 349 | CHECK_LESS_OR_EQUAL(count, 0x1FFFFF, ()); |
| 350 | |
| 351 | WriteVarUint(sink, static_cast<uint32_t>(count)); |
| 352 | |
| 353 | std::for_each(m_buffers.begin(), m_buffers.end(), |
| 354 | std::bind(&WriteBufferToSink<TSink>, std::placeholders::_1, std::ref(sink))); |
| 355 | } |
| 356 | }; |
| 357 | } // namespace serial |
nothing calls this directly
no test coverage detected