Browse Source

src: remove unused code

PR-URL: https://github.com/iojs/io.js/pull/1042
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
v1.8.0-commit
Ben Noordhuis 10 years ago
parent
commit
f5b7e18243
  1. 10
      src/string_bytes.cc

10
src/string_bytes.cc

@ -754,21 +754,17 @@ Local<Value> StringBytes::Encode(Isolate* isolate,
Local<Value> StringBytes::Encode(Isolate* isolate,
const uint16_t* buf,
size_t buflen) {
const uint16_t* src = buf;
Local<String> val;
if (buflen < EXTERN_APEX) {
val = String::NewFromTwoByte(isolate,
src,
buf,
String::kNormalString,
buflen);
} else {
val = ExternTwoByteString::NewFromCopy(isolate, src, buflen);
val = ExternTwoByteString::NewFromCopy(isolate, buf, buflen);
}
if (src != buf)
delete[] src;
return val;
}

Loading…
Cancel
Save