FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: replace `auto`s in node_api.cc by XadillaX · Pull Request #38852 · nodejs/node · GitHub

/ node Public

src: replace autos in node_api.cc - #38852

Closed
XadillaX wants to merge 1 commit into
nodejs:masterfrom
XadillaX:auto-node_api
Closed

src: replace autos in node_api.cc#38852
XadillaX wants to merge 1 commit into
nodejs:masterfrom
XadillaX:auto-node_api

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

github-actions Bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels May 30, 2021

bl-ue left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

All looks good, but why not use auto, exactly?

Copy link
Copy Markdown
Contributor Author

All looks good, but why not use auto, exactly?

https://github.com/nodejs/node/blob/master/doc/guides/cpp-style-guide.md#using-auto

bl-ue commented May 30, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Ah, makes perfect sense.

Use auto to avoid type names that are noisy, obvious, or unimportant. When doing so, keep in mind that explicit types often help with readability and verifying the correctness of code.

Those are points that I've thought about myself. Of course, when you're using an IDE, it'll tell you what auto is, but that privilege may not be available to everyone.

Comment thread src/node_api.cc
{0, 0});
} else {
auto node_async_context =
v8impl::AsyncContext* node_async_context =

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

By the way, I think the results of casts and new ... can qualify as “obvious” types. I don’t mind changing these, but I’d avoid doing it everywhere because of the churn it creates.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I just consider that "Forget auto keywords in C++ except lambda".

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

mhdawson left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

mhdawson added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label May 31, 2021
XadillaX added a commit that referenced this pull request Jun 1, 2021
PR-URL: #38852
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>

XadillaX commented Jun 1, 2021

Copy link
Copy Markdown
Contributor Author

Landed in 46acbb0

XadillaX closed this Jun 1, 2021
danielleadams pushed a commit that referenced this pull request Jun 2, 2021
PR-URL: #38852
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
danielleadams mentioned this pull request Jun 2, 2021
richardlau pushed a commit that referenced this pull request Jul 16, 2021
PR-URL: #38852
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
richardlau pushed a commit that referenced this pull request Jul 19, 2021
PR-URL: #38852
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
richardlau pushed a commit that referenced this pull request Jul 20, 2021
PR-URL: #38852
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
richardlau mentioned this pull request Jul 20, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL