From 5e3c62593b1e79ca2677c8b187d25a668c484103 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Mon, 20 Apr 2015 14:28:51 -0700 Subject: [PATCH] remove unnecessary intermediate variables --- index.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index ed987ad..b150c25 100644 --- a/index.js +++ b/index.js @@ -383,13 +383,11 @@ function hexWrite (buf, string, offset, length) { } function utf8Write (buf, string, offset, length) { - var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) - return charsWritten + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) } function asciiWrite (buf, string, offset, length) { - var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) - return charsWritten + return blitBuffer(asciiToBytes(string), buf, offset, length) } function binaryWrite (buf, string, offset, length) { @@ -397,8 +395,7 @@ function binaryWrite (buf, string, offset, length) { } function base64Write (buf, string, offset, length) { - var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) - return charsWritten + return blitBuffer(base64ToBytes(string), buf, offset, length) } function ucs2Write (buf, string, offset, length) { -- 2.34.1