summaryrefslogtreecommitdiff
path: root/src/common/ring_buffer.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-06-22 21:53:07 -0700
committerGitHub <noreply@github.com>2023-06-22 21:53:07 -0700
commit2fc5dedf6996d4a5c93ddf1ccd67a6963e4827e8 (patch)
treed82f2cf4f7a5e9773616846c095a941b282a84f6 /src/common/ring_buffer.h
parent3f3e4efb30de021fed52badc34808008276db9e7 (diff)
parent5da70f719703084482933e103e561cc98163f370 (diff)
Merge pull request #10457 from Kelebek1/optimise
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 4c328ab44..416680d44 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());
}