Skip to content

src: move const variable in node_file.h to node_file.cc - #49688

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
pluris:fix/const_variable
Sep 29, 2023
Merged

src: move const variable in node_file.h to node_file.cc#49688
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
pluris:fix/const_variable

Conversation

@pluris

Copy link
Copy Markdown
Contributor

After checking the comments in the reference, it seems that there is no need to define a 'const' variable in the header.

It seems efficient to handle this by defining it as constexpr in the source file so that it can be evaluated at compile time. For this purpose, it would be better to change it to std::string_view rather than handling it as std::string.

Refs: #48325

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Sep 17, 2023
@anonriganonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Sep 17, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 17, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@anonriganonrig added the review wanted PRs that need reviews. label Sep 20, 2023
@aduh95aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 29, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 29, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 43500fa into nodejs:mainSep 29, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 43500fa

@pluris
pluris deleted the fix/const_variable branch November 8, 2023 02:24
targos pushed a commit that referenced this pull request Nov 11, 2023
PR-URL: #49688
Refs: #48325
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@targostargos mentioned this pull request Nov 12, 2023
debadree25 pushed a commit to debadree25/node that referenced this pull request Apr 15, 2024
PR-URL: nodejs#49688
Refs: nodejs#48325
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
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++.fsIssues and PRs related to the fs subsystem / file system.needs-ciPRs that need a full CI run.review wantedPRs that need reviews.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@pluris@nodejs-github-bot@anonrig@H4ad@aduh95