Skip to content

src: refactor to nullptr - #25888

Closed
gengjiawen wants to merge 1 commit into
nodejs:masterfrom
gengjiawen:cpp_use_nullptr
Closed

src: refactor to nullptr#25888
gengjiawen wants to merge 1 commit into
nodejs:masterfrom
gengjiawen:cpp_use_nullptr

Conversation

@gengjiawen

Copy link
Copy Markdown
Member

Replace 0 with nullptr in multi places for clarity.

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Feb 2, 2019
@gengjiawen

Copy link
Copy Markdown
MemberAuthor

Is there easy way I can use to do cpplint on windows ? Looks vcbuild test don't do cpplint.

@gengjiawen

Copy link
Copy Markdown
MemberAuthor

Found vcbuild lint. But looks like no auto fix like prettier in js.

Signed-off-by: gengjiawen <technicalcute@gmail.com>
@gengjiawen

Copy link
Copy Markdown
MemberAuthor

@addaleax Can you review this pr ? Thanks.

@danbev

Copy link
Copy Markdown
Contributor

Comment threadsrc/node.h
* Callbacks are run in reverse order of registration, i.e. newest first.
*/
NODE_EXTERN void AtExit(void (*cb)(void* arg), void* arg = 0);
NODE_EXTERN void AtExit(void (*cb)(void* arg), void* arg = nullptr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyone know is this has any chance of effecting the ecosystem?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use nullptr elsewhere in this file, so I think this should be okay.

@refack

Copy link
Copy Markdown
Contributor

@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 6, 2019
@danbev

Copy link
Copy Markdown
Contributor

Landed in abba102.

@danbevdanbev closed this Feb 7, 2019
danbev pushed a commit that referenced this pull request Feb 7, 2019
Signed-off-by: gengjiawen <technicalcute@gmail.com>
PR-URL: #25888
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
addaleax pushed a commit that referenced this pull request Feb 7, 2019
Signed-off-by: gengjiawen <technicalcute@gmail.com>
PR-URL: #25888
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
@targostargos mentioned this pull request Feb 14, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@gengjiawen@danbev@refack@jasnell@addaleax@cjihrig@nodejs-github-bot