fxos: fix a very suspicious dangling reference

This commit is contained in:
Lephenixnoir 2023-11-04 11:04:43 +01:00
parent 06a9d7e5af
commit bbfb96bb1a
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 3 additions and 2 deletions

View File

@ -27,9 +27,10 @@ struct Queue
{
return pending.empty();
}
T &pop()
T pop()
{
T &object = pending.front();
// TODO: Move object out of container maybe (unclear if possible)
T object = pending.front();
pending.pop();
return object;
}