Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: use As() instead of Cast() for conversions #40287

Conversation

RaisinTen
Copy link
Contributor

We mostly use As() instead of Cast() in our code, so this change
replaces the remaining calls to Cast() with calls to As() to maintain
the consistency.

Refs: https://github.com/nodejs/node/pull/39921/files#r702293529

Signed-off-by: Darshan Sen darshan.sen@postman.com

@nodejs-github-bot nodejs-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. needs-ci PRs that need a full CI run. labels Oct 2, 2021
@RaisinTen RaisinTen force-pushed the src/use-As-instead-of-Cast-for-conversions branch from 9bb6b65 to 1967e1c Compare October 2, 2021 14:35
@nodejs-github-bot

This comment has been minimized.

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

👍

@RaisinTen RaisinTen added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed needs-ci PRs that need a full CI run. labels Oct 2, 2021
src/module_wrap.cc Outdated Show resolved Hide resolved
Copy link
Member

@juanarbol juanarbol left a comment

Choose a reason for hiding this comment

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

LGTM

We mostly use `As()` instead of `Cast()` in our code, so this change
replaces the remaining calls to `Cast()` with calls to `As()` to
maintain the consistency.

Refs: https://github.com/nodejs/node/pull/39921/files#r702293529

Signed-off-by: Darshan Sen <darshan.sen@postman.com>
@RaisinTen RaisinTen force-pushed the src/use-As-instead-of-Cast-for-conversions branch from 1967e1c to fcb40c7 Compare October 3, 2021 04:50
@RaisinTen RaisinTen requested a review from lpinca October 3, 2021 04:51
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@targos targos added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 5, 2021
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 5, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2021

Landed in 8fc4169...7b8552f

@github-actions github-actions bot closed this Oct 5, 2021
nodejs-github-bot pushed a commit that referenced this pull request Oct 5, 2021
We mostly use `As()` instead of `Cast()` in our code, so this change
replaces the remaining calls to `Cast()` with calls to `As()` to
maintain the consistency.

Refs: https://github.com/nodejs/node/pull/39921/files#r702293529

Signed-off-by: Darshan Sen <darshan.sen@postman.com>

PR-URL: #40287
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
@RaisinTen RaisinTen deleted the src/use-As-instead-of-Cast-for-conversions branch October 5, 2021 13:28
danielleadams pushed a commit that referenced this pull request Oct 5, 2021
We mostly use `As()` instead of `Cast()` in our code, so this change
replaces the remaining calls to `Cast()` with calls to `As()` to
maintain the consistency.

Refs: https://github.com/nodejs/node/pull/39921/files#r702293529

Signed-off-by: Darshan Sen <darshan.sen@postman.com>

PR-URL: #40287
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
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 pending requests for changes, and a CI started. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants