Remove all remaining new keywords from Buffer.alloc(s)

This commit is contained in:
Holly Stubbs 2022-02-23 02:49:25 +00:00
parent 8080cd353b
commit 79bbe5a38d
Signed by: tgpholly
GPG key ID: B8583C4B7D18119E
2 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ if (config.compression) {
} else consoleHelper.printWarn("Gzip Compression is disabled!");
app.use((req, res) => {
req.packet = new Buffer.alloc(0);
req.packet = Buffer.alloc(0);
req.on("data", (chunk) => req.packet = Buffer.concat([req.packet, chunk], req.packet.length + chunk.length));
req.on("end", () => {
switch (req.method) {

View file

@ -6,7 +6,7 @@ module.exports = class {
this.username = username;
this.uuid = uuid;
this.connectTime = connectTime;
this.queue = new Buffer.alloc(0);
this.queue = Buffer.alloc(0);
// Binato specific
this.rankingMode = 0;
@ -130,6 +130,6 @@ module.exports = class {
// Clears out the user's queue
clearQueue() {
this.queue = new Buffer.alloc(0);
this.queue = Buffer.alloc(0);
}
}