remove more std::move

std::move needs to be used with pointers, we werent doing that and so a temp var was being copied onto the heap when it should of stayed on the stack. This caused memory leaks
This commit is contained in:
marauder2k7 2025-05-09 08:47:34 +01:00
parent 5fc9da789b
commit 8176145aaa
6 changed files with 12 additions and 40 deletions

View file

@ -89,10 +89,10 @@ public:
stack.pop_back();
}
TORQUE_FORCEINLINE void push(ConsoleValue&& val)
TORQUE_FORCEINLINE void push(ConsoleValue val)
{
Frame& frame = stack.last();
frame.values[frame.internalCounter++] = std::move(val);
frame.values[frame.internalCounter++] = (val);
}
TORQUE_FORCEINLINE void argvc(StringTableEntry fn, S32& argc, ConsoleValue** argv)