Skip to content

Commit

Permalink
Use string::data instead of string::front in NewOneByteString
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoopa committed Jan 22, 2017
1 parent a93b8ba commit d5f9203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ widenString(std::vector<uint16_t> *ws, const uint8_t *s, int l) {
NewOneByteString(const uint8_t * value, int length = -1) {
std::vector<uint16_t> wideString; // NOLINT(build/include_what_you_use)
imp::widenString(&wideString, value, length);
return v8::String::New(&wideString.front(),
return v8::String::New(wideString.data(),
static_cast<int>(wideString.size()));
}

Expand Down

0 comments on commit d5f9203

Please sign in to comment.