Replace deprecated new Buffer(size) with Buffer.alloc()

pull/43/head
Christian Paul 2018-08-14 00:44:17 -07:00
rodzic 7a313c8a7c
commit 2bf82b8f46
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -46,9 +46,9 @@ class BrailleBuffer {
this.height = height;
const size = width*height/8;
this.pixelBuffer = new Buffer(size);
this.foregroundBuffer = new Buffer(size);
this.backgroundBuffer = new Buffer(size);
this.pixelBuffer = Buffer.alloc(size);
this.foregroundBuffer = Buffer.alloc(size);
this.backgroundBuffer = Buffer.alloc(size);
this._mapBraille();
this.clear();