Skip to content

Commit

Permalink
src: remove unused code
Browse files Browse the repository at this point in the history
PR-URL: #1042
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
bnoordhuis committed Mar 5, 2015
1 parent 4ae64b2 commit f5b7e18
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/string_bytes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f5b7e18

Please sign in to comment.