Skip to content

src: use .data() instead of .c_str()

Since C++11 onwards, .data() is required to be null terminated, and can be used always instead of .c_str().

I mildly prefer c_str(), but if Node only supports C++11, this will convert to .data().

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src

cf. https://github.com/nodejs/node/pull/11006#discussion_r100238194

Merge request reports

Loading