Skip to content

Commit e036645

Browse files
committed
Improvements to copying between static and dynamic sized queues
1 parent 878c91f commit e036645

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

scripts/Game/Global/ESE_DynamicQueue.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ class ESE_DynamicQueue<Class T>
113113
Raw.Compact();
114114
}
115115
// ----------------------------------------------------------------------------------------------------------- //
116+
void Compact()
117+
{
118+
Raw.Compact();
119+
}
120+
// ----------------------------------------------------------------------------------------------------------- //
116121
typename GetDataType()
117122
{
118123
return T;

scripts/Game/Global/ESE_Queue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ class ESE_Queue<Class T>
152152
newArray.Copy(Raw);
153153
}
154154
// ----------------------------------------------------------------------------------------------------------- //
155-
void CopyToQueue(notnull inout ESE_Queue<T> newQueue)
155+
void CopyToDynamicQueue(notnull inout ESE_DynamicQueue<T> newQueue)
156156
{
157157
newQueue.Raw.Copy(this.Raw);
158-
newQueue.Resize(MaxSize);
158+
newQueue.Compact();
159159
}
160160
// ----------------------------------------------------------------------------------------------------------- //
161161
void CopyFromArray(notnull array<T> oldArray)

0 commit comments

Comments
 (0)