Skip to content

avoid unnecessary string copies in function parameters - #8804

Open
IamRezaMousavi wants to merge 1 commit into
arvidn:RC_2_1from
IamRezaMousavi:use-ref-string
Open

avoid unnecessary string copies in function parameters#8804
IamRezaMousavi wants to merge 1 commit into
arvidn:RC_2_1from
IamRezaMousavi:use-ref-string

Conversation

@IamRezaMousavi

Copy link
Copy Markdown

Change std::string parameters to std::string const& in a few functions where the string is only read.

@arvidn

arvidn commented Aug 29, 2026

Copy link
Copy Markdown
Owner

I believe some of those implement interfaces, and changing them would require changing the interface and all other implementations as well.

Also, if possible, I think std::string_view is generally a better substitute for by-value std::string.

@arvidn

arvidn commented Aug 29, 2026

Copy link
Copy Markdown
Owner

it's advisable to make sure the changes compile locally, before pushing the PR.
Also, your agent should monitor the CI status, so it can react to if failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants