aboutsummaryrefslogtreecommitdiff
path: root/src/common/ring_buffer.h
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2023-05-23 14:45:54 +0100
committerKelebek1 <eeeedddccc@hotmail.co.uk>2023-06-22 08:05:10 +0100
commitc7430e51e38356742de52817a1ee82dcd0c97b76 (patch)
tree1926842ed2b90bf92b89cec6a314bb28c7287fe9 /src/common/ring_buffer.h
parent72a469b967d5fa4bfda2d07840136b8bf136fda7 (diff)
Remove memory allocations in some hot paths
Diffstat (limited to 'src/common/ring_buffer.h')
-rw-r--r--src/common/ring_buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/ring_buffer.h b/src/common/ring_buffer.h
index 4c328ab446..416680d445 100644
--- a/src/common/ring_buffer.h
+++ b/src/common/ring_buffer.h
@@ -9,6 +9,7 @@
#include <cstddef>
#include <cstring>
#include <new>
+#include <span>
#include <type_traits>
#include <vector>
@@ -53,7 +54,7 @@ public:
return push_count;
}
- std::size_t Push(const std::vector<T>& input) {
+ std::size_t Push(const std::span<T> input) {
return Push(input.data(), input.size());
}