MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / appendUniqueIndex

Function appendUniqueIndex

app/src/Sessions/ReportData.cpp:333–342  ·  view source on GitHub ↗

* @brief Appends @p index to @p indices when it is not already present. */

Source from the content-addressed store, hash-verified

331 * @brief Appends @p index to @p indices when it is not already present.
332 */
333static void appendUniqueIndex(std::vector<std::size_t>& indices, std::size_t index)
334{
335 Q_ASSERT(indices.size() <= 8);
336
337 for (const auto value : indices)
338 if (value == index)
339 return;
340
341 indices.push_back(index);
342}
343
344/**
345 * @brief Appends one bucket's representative sample indices to @p indices.

Callers 1

appendBucketSamplesFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected