* @brief Span-lane twin of captureLatestChannels: in-place UTF-8 writes into the reused token * list keep the capture allocation-free in steady state. @p count is span-lane bounded. */
| 637 | * list keep the capture allocation-free in steady state. @p count is span-lane bounded. |
| 638 | */ |
| 639 | void DataModel::FrameBuilder::captureLatestChannelSpans(int sourceId, |
| 640 | const QByteArrayView* spans, |
| 641 | qsizetype count) |
| 642 | { |
| 643 | Q_ASSERT(spans != nullptr); |
| 644 | Q_ASSERT(m_captureLatestFrame); |
| 645 | Q_ASSERT(count > 0 && count <= kMaxSpanFields); |
| 646 | |
| 647 | const auto it = m_latestFrames.find(sourceId); |
| 648 | if (it == m_latestFrames.end()) [[unlikely]] |
| 649 | return; |
| 650 | |
| 651 | it->channels.resize(count); |
| 652 | for (qsizetype i = 0; i < count; ++i) |
| 653 | DataModel::assign_utf8_in_place(it->channels[i], spans[i]); |
| 654 | |
| 655 | it->channelsSequence = it->sequence; |
| 656 | } |
| 657 | |
| 658 | /** |
| 659 | * @brief Dispatches a captured chunk to the parser for the current operation mode. |
nothing calls this directly
no test coverage detected