Skip to content

Commit

Permalink
src: remove redundant cast in util-inl.h
Browse files Browse the repository at this point in the history
PR-URL: #26410
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  • Loading branch information
gengjiawen authored and BethGriggs committed Apr 16, 2019
1 parent 6586003 commit 479ef60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/util-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,9 @@ inline v8::Local<v8::String> OneByteString(v8::Isolate* isolate,
inline v8::Local<v8::String> OneByteString(v8::Isolate* isolate,
const unsigned char* data,
int length) {
return v8::String::NewFromOneByte(isolate,
reinterpret_cast<const uint8_t*>(data),
v8::NewStringType::kNormal,
length).ToLocalChecked();
return v8::String::NewFromOneByte(
isolate, data, v8::NewStringType::kNormal, length)
.ToLocalChecked();
}

void SwapBytes16(char* data, size_t nbytes) {
Expand Down

0 comments on commit 479ef60

Please sign in to comment.