Skip to content

Commit f88dcc5

Browse files
committed
Collections updated to support both get and set direct indexing
1 parent 802463d commit f88dcc5

File tree

5 files changed

+28
-8
lines changed

5 files changed

+28
-8
lines changed

resourceDatabase.rdb

0 Bytes
Binary file not shown.

scripts/Game/Collections/ESE_DynamicQueue.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,14 @@ class ESE_DynamicQueue<Class T>: Managed
145145
Print(Raw);
146146
}
147147
// ----------------------------------------------------------------------------------------------------------- //
148-
T Get(int i)
148+
T Get(int n)
149149
{
150-
return Raw[i];
150+
return Raw[n];
151+
}
152+
// ----------------------------------------------------------------------------------------------------------- //
153+
void Set(int n, T value)
154+
{
155+
Raw[n] = value;
151156
}
152157
// ----------------------------------------------------------------------------------------------------------- //
153158
void ESE_DynamicQueue()

scripts/Game/Collections/ESE_DynamicStack.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,14 @@ class ESE_DynamicStack<Class T>: Managed
146146
Print(Raw);
147147
}
148148
// ----------------------------------------------------------------------------------------------------------- //
149-
T Get(int i)
149+
T Get(int n)
150150
{
151-
return Raw[i];
151+
return Raw[n];
152+
}
153+
// ----------------------------------------------------------------------------------------------------------- //
154+
void Set(int n, T value)
155+
{
156+
Raw[n] = value;
152157
}
153158
// ----------------------------------------------------------------------------------------------------------- //
154159
void ESE_DynamicStack()

scripts/Game/Collections/ESE_Queue.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,14 @@ class ESE_Queue<Class T>: Managed
179179
Print(Raw);
180180
}
181181
// ----------------------------------------------------------------------------------------------------------- //
182-
T Get(int i)
182+
T Get(int n)
183183
{
184-
return Raw[i];
184+
return Raw[n];
185+
}
186+
// ----------------------------------------------------------------------------------------------------------- //
187+
void Set(int n, T value)
188+
{
189+
Raw[n] = value;
185190
}
186191
// ----------------------------------------------------------------------------------------------------------- //
187192
void ESE_Queue(int size)

scripts/Game/Collections/ESE_Stack.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,14 @@ class ESE_Stack<Class T>: Managed
169169
Print(Raw);
170170
}
171171
// ----------------------------------------------------------------------------------------------------------- //
172-
T Get(int i)
172+
T Get(int n)
173173
{
174-
return Raw[i];
174+
return Raw[n];
175+
}
176+
// ----------------------------------------------------------------------------------------------------------- //
177+
void Set(int n, T value)
178+
{
179+
Raw[n] = value;
175180
}
176181
// ----------------------------------------------------------------------------------------------------------- //
177182
void ESE_Stack(int size)

0 commit comments

Comments
 (0)