From a54de5273f3d651b9796ea30711a0e6ebcddda92 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 6 May 2025 13:32:46 +0200 Subject: [PATCH] use std::forward in the queuea constructor --- drawing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drawing.cpp b/drawing.cpp index ab55c01b..bba8ac77 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2732,8 +2732,8 @@ EX void drawqueue() { } #if HDR -template T& queuea(PPR prio, U... u) { - ptds.push_back(unique_ptr(new T (u...))); +template T& queuea(PPR prio, U&&... u) { + ptds.push_back(unique_ptr(new T (std::forward(u)...))); ptds.back()->prio = prio; return (T&) *ptds.back(); }