mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
Update map
This commit is contained in:
parent
368ed8b404
commit
3c78e86609
@ -7,12 +7,14 @@ export class AdvancedMap<T, U> implements IDisposable
|
|||||||
private _array: U[];
|
private _array: U[];
|
||||||
private _keys: T[];
|
private _keys: T[];
|
||||||
|
|
||||||
constructor()
|
constructor(map: Map<T, U> = null)
|
||||||
{
|
{
|
||||||
this._length = 0;
|
this._length = 0;
|
||||||
this._dictionary = new Map();
|
this._dictionary = new Map();
|
||||||
this._array = [];
|
this._array = [];
|
||||||
this._keys = [];
|
this._keys = [];
|
||||||
|
|
||||||
|
if(map) for(const [ key, value ] of map.entries()) this.add(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get length(): number
|
public get length(): number
|
||||||
|
Loading…
Reference in New Issue
Block a user