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

various cpp improvement in src folder #26470

Merged
merged 1 commit into from
Mar 10, 2019
Merged

Conversation

gengjiawen
Copy link
Member

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

@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. labels Mar 6, 2019
@@ -220,9 +222,9 @@ class ThreadSafeFunction : public node::AsyncResource {

if (uv_async_init(loop, &async, AsyncCb) == 0) {
if (max_queue_size > 0) {
cond.reset(new node::ConditionVariable);
cond = std::make_unique<node::ConditionVariable>();
Copy link
Member Author

Choose a reason for hiding this comment

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

I am thinking apply this rule https://clang.llvm.org/extra/clang-tidy/checks/modernize-make-unique.html to whole repo, thoughts ?

cc @addaleax @refack

src/node_api.cc Outdated Show resolved Hide resolved
@BridgeAR
Copy link
Member

BridgeAR commented Mar 6, 2019

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 6, 2019
src/node_crypto_bio.cc Outdated Show resolved Hide resolved
@gengjiawen gengjiawen changed the title various cpp improment in src folder various cpp improvement in src folder Mar 7, 2019
@BridgeAR
Copy link
Member

BridgeAR commented Mar 9, 2019

@refack
Copy link
Contributor

refack commented Mar 10, 2019

* rewrite to default label in method ConvertUVErrorCode
* improve if condition in method PeekWritable
* remove redundant cast in node_file.cc

PR-URL: nodejs#26470
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@refack refack merged commit 6e81a95 into nodejs:master Mar 10, 2019
@gengjiawen gengjiawen deleted the 19_03_06_misc branch March 10, 2019 04:29
BridgeAR pushed a commit that referenced this pull request Mar 13, 2019
* rewrite to default label in method ConvertUVErrorCode
* improve if condition in method PeekWritable
* remove redundant cast in node_file.cc

PR-URL: #26470
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BridgeAR pushed a commit that referenced this pull request Mar 13, 2019
* rewrite to default label in method ConvertUVErrorCode
* improve if condition in method PeekWritable
* remove redundant cast in node_file.cc

PR-URL: #26470
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BridgeAR pushed a commit that referenced this pull request Mar 14, 2019
* rewrite to default label in method ConvertUVErrorCode
* improve if condition in method PeekWritable
* remove redundant cast in node_file.cc

PR-URL: #26470
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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.

8 participants