common: Fiber: use a reference for YieldTo.

- Fixes another small leak.
This commit is contained in:
bunnei 2021-03-07 13:46:53 -08:00
parent 68ffac250a
commit 8f7eb194af
5 changed files with 27 additions and 34 deletions

View file

@ -41,7 +41,7 @@ public:
/// Yields control from Fiber 'from' to Fiber 'to'
/// Fiber 'from' must be the currently running fiber.
static void YieldTo(std::weak_ptr<Fiber> weak_from, std::shared_ptr<Fiber> to);
static void YieldTo(std::weak_ptr<Fiber> weak_from, Fiber& to);
[[nodiscard]] static std::shared_ptr<Fiber> ThreadToFiber();
void SetRewindPoint(std::function<void(void*)>&& rewind_func, void* rewind_param);