repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2541c61
)
Make the default circular array size a const
author
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 13 May 2021 17:48:51 +0000
(19:48 +0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 13 May 2021 17:48:51 +0000
(19:48 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/CircularArray.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/utils/CircularArray.ts
b/src/utils/CircularArray.ts
index 3e489f640fe3f4e0ca92091fb1b8adb32b39458a..c46b06b6cb8983bb2cab53bf1a0e248a0452d005 100644
(file)
--- a/
src/utils/CircularArray.ts
+++ b/
src/utils/CircularArray.ts
@@
-1,11
+1,11
@@
+const DEFAULT_CIRCULAR_ARRAY_SIZE = 2000;
export default class CircularArray<T> extends Array<T> {
public size: number;
- private readonly defaultCircularArraySize = 2000;
constructor(size?: number) {
super();
- this.size = size ??
this.defaultCircularArraySize
;
+ this.size = size ??
DEFAULT_CIRCULAR_ARRAY_SIZE
;
}
public push(...items: T[]): number {