Browse Source

buffer: minor cleanup from rebase

PR-URL: https://github.com/nodejs/io.js/pull/2003
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
v4.0.0-rc
Trevor Norris 10 years ago
committed by Rod Vagg
parent
commit
e5ada116cd
  1. 11
      lib/internal/buffer_new.js

11
lib/internal/buffer_new.js

@ -457,16 +457,7 @@ Buffer.prototype.write = function(string, offset, length, encoding) {
// XXX legacy write(string, encoding, offset, length) - remove in v0.13
} else {
if (!writeWarned) {
if (process.throwDeprecation)
throw new Error(writeMsg);
else if (process.traceDeprecation)
console.trace(writeMsg);
else
console.error(writeMsg);
writeWarned = true;
}
writeWarned = internalUtil.printDeprecationMessage(writeMsg, writeWarned);
var swap = encoding;
encoding = offset;
offset = length >>> 0;

Loading…
Cancel
Save