mirror of
https://github.com/rastapasta/mapscii.git
synced 2024-11-22 08:03:07 +01:00
Replace deprecated new Buffer(size) with Buffer.alloc()
This commit is contained in:
parent
7a313c8a7c
commit
2bf82b8f46
@ -46,9 +46,9 @@ class BrailleBuffer {
|
|||||||
this.height = height;
|
this.height = height;
|
||||||
|
|
||||||
const size = width*height/8;
|
const size = width*height/8;
|
||||||
this.pixelBuffer = new Buffer(size);
|
this.pixelBuffer = Buffer.alloc(size);
|
||||||
this.foregroundBuffer = new Buffer(size);
|
this.foregroundBuffer = Buffer.alloc(size);
|
||||||
this.backgroundBuffer = new Buffer(size);
|
this.backgroundBuffer = Buffer.alloc(size);
|
||||||
|
|
||||||
this._mapBraille();
|
this._mapBraille();
|
||||||
this.clear();
|
this.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user