From e60123cfc030a4a374be6e5debfc78e9008958b5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 18 Oct 2024 09:53:35 +0200 Subject: [PATCH] [util] Properly return reference from small_vector emplace_back --- src/util/util_small_vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/util_small_vector.h b/src/util/util_small_vector.h index 1846e66b9..8d7c37d64 100644 --- a/src/util/util_small_vector.h +++ b/src/util/util_small_vector.h @@ -133,9 +133,9 @@ namespace dxvk { } template - void emplace_back(Args... args) { + T& emplace_back(Args... args) { reserve(m_size + 1); - new (ptr(m_size++)) T(std::forward(args)...); + return *(new (ptr(m_size++)) T(std::forward(args)...)); } void erase(size_t idx) {