From a855ce019e1df29b1466ee3e060adc1d5b12d937 Mon Sep 17 00:00:00 2001 From: "Chodor, Jaroslaw" Date: Thu, 17 Apr 2025 00:40:37 +0000 Subject: [PATCH] refactor: pass underlying allocator by ref Signed-off-by: Chodor, Jaroslaw --- shared/source/utilities/bitcontainers.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared/source/utilities/bitcontainers.h b/shared/source/utilities/bitcontainers.h index ddd5dcc1c1..ea9ebf80b5 100644 --- a/shared/source/utilities/bitcontainers.h +++ b/shared/source/utilities/bitcontainers.h @@ -190,9 +190,10 @@ class OpaqueElementAllocator final { std::vector chunks; public: + template OpaqueElementAllocator(size_t chunkSize, size_t alignedElementSize, - UnderlyingAllocatorT underlyingAllocator) : chunkSize(chunkSize), alignedElementSize(alignedElementSize), - underlyingAllocator(std::move(underlyingAllocator)) { + GivenAllocatorT &&underlyingAllocator) : chunkSize(chunkSize), alignedElementSize(alignedElementSize), + underlyingAllocator(std::forward(underlyingAllocator)) { UNRECOVERABLE_IF(chunkSize < alignedElementSize); DEBUG_BREAK_IF((chunkSize % alignedElementSize) != 0); }