[ntcore] Add typed C GetEntryValue and ReadQueueValue functions (#6256)

This commit is contained in:
Thad House
2024-01-19 20:38:01 -08:00
committed by GitHub
parent 2df82ec957
commit dfaad7ca22
7 changed files with 70 additions and 5 deletions

View File

@@ -6,10 +6,13 @@
using namespace nt;
std::vector<Value> ValueCircularBuffer::ReadValue() {
std::vector<Value> ValueCircularBuffer::ReadValue(unsigned int types) {
std::vector<Value> rv;
rv.reserve(m_storage.size());
for (auto&& val : m_storage) {
if (types != 0 && (types & val.type()) == 0) {
continue;
}
rv.emplace_back(std::move(val));
}
m_storage.reset();