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

Use std::string_view instead of strlen #48520

Conversation

ltrk2
Copy link
Contributor

@ltrk2 ltrk2 commented Apr 6, 2023

I used std::string_view instead of statically allocated const char* in order to save a call to strlen and make things look more modern.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Apr 6, 2023
@alexey-milovidov alexey-milovidov self-assigned this Apr 6, 2023
@alexey-milovidov
Copy link
Member

There is no call to strlen. The code is written in a way that the strlen result is known at compile time.

@alexey-milovidov
Copy link
Member

Nevertheless, the change is ok.

@ucasfl ucasfl added the can be tested Allows running workflows for external contributors label Apr 7, 2023
@alexey-milovidov alexey-milovidov merged commit 16fe18a into ClickHouse:master Apr 8, 2023
136 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can be tested Allows running workflows for external contributors pr-not-for-changelog This PR should not be mentioned in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants