Skip to content

Commit b82d4e6

Browse files
committed
Fixed queue's TryDequeue() and TryPeek() methods not outputting to the parameter variable
1 parent e036645 commit b82d4e6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/Game/Global/ESE_DynamicQueue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ESE_DynamicQueue<Class T>
5757
return value;
5858
}
5959
// ----------------------------------------------------------------------------------------------------------- //
60-
bool TryDequeue(T output)
60+
bool TryDequeue(out T output)
6161
{
6262
int lastIndex = Raw.Count() - 1;
6363
if (lastIndex < 0)
@@ -73,7 +73,7 @@ class ESE_DynamicQueue<Class T>
7373
return true;
7474
}
7575
// ----------------------------------------------------------------------------------------------------------- //
76-
bool TryPeek(T output)
76+
bool TryPeek(out T output)
7777
{
7878
int lastIndex = Raw.Count() - 1;
7979
if (lastIndex < 0)

scripts/Game/Global/ESE_Queue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ESE_Queue<Class T>
7575
return value;
7676
}
7777
// ----------------------------------------------------------------------------------------------------------- //
78-
bool TryDequeue(T output)
78+
bool TryDequeue(out T output)
7979
{
8080
int lastIndex = Raw.Count() - 1;
8181
if (lastIndex < 0)
@@ -91,7 +91,7 @@ class ESE_Queue<Class T>
9191
return true;
9292
}
9393
// ----------------------------------------------------------------------------------------------------------- //
94-
bool TryPeek(T output)
94+
bool TryPeek(out T output)
9595
{
9696
int lastIndex = Raw.Count() - 1;
9797
if (lastIndex < 0)

0 commit comments

Comments
 (0)