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 BridgeAR committed Mar 14, 2019
1 parent b879c1e commit 203fa63
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 @@ -186,10 +186,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 203fa63

Please sign in to comment.