fix: add missing const to ObjectReference::Set string parameter by umuoy1 · Pull Request #1713 · nodejs/node-addon-api · GitHub
Skip to content

fix: add missing const to ObjectReference::Set string parameter#1713

Merged
legendecas merged 1 commit intonodejs:mainfrom
umuoy1:fix-const-string-param
Mar 6, 2026
Merged

fix: add missing const to ObjectReference::Set string parameter#1713
legendecas merged 1 commit intonodejs:mainfrom
umuoy1:fix-const-string-param

Conversation

@umuoy1
Copy link
Copy Markdown
Contributor

@umuoy1 umuoy1 commented Mar 3, 2026

The ObjectReference::Set(const std::string&, std::string&) overload was missing a const qualifier on the value parameter, making it inconsistent with other Set overloads. This prevented passing temporary std::string objects (rvalues).
Adding const allows for more flexible usage without unnecessary string copies.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 4, 2026

@legendecas legendecas merged commit 845ba8e into nodejs:main Mar 6, 2026
60 checks passed
@github-project-automation github-project-automation Bot moved this from Need Triage to Done in Node-API Team Project Mar 6, 2026
@github-actions github-actions Bot mentioned this pull request Mar 6, 2026
@umuoy1 umuoy1 deleted the fix-const-string-param branch March 9, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants