1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-29 16:57:56 +00:00

use std::forward in the queuea constructor

This commit is contained in:
Zeno Rogue
2025-05-06 13:32:46 +02:00
parent 2a58a6d4db
commit a54de5273f

View File

@@ -2732,8 +2732,8 @@ EX void drawqueue() {
} }
#if HDR #if HDR
template<class T, class... U> T& queuea(PPR prio, U... u) { template<class T, class... U> T& queuea(PPR prio, U&&... u) {
ptds.push_back(unique_ptr<T>(new T (u...))); ptds.push_back(unique_ptr<T>(new T (std::forward<U>(u)...)));
ptds.back()->prio = prio; ptds.back()->prio = prio;
return (T&) *ptds.back(); return (T&) *ptds.back();
} }