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 .data() to get pointer instead of address of 0 #762

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Oct 21, 2022

No description provided.

@@ -1119,7 +1119,7 @@ namespace vcpkg
// This implementation does collapse slashes because we primarily use it for shiny display purposes.
void Path::make_preferred()
{
char* first = &m_str[0];
char* first = m_str.data();
Copy link
Member

Choose a reason for hiding this comment

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

It was probably done this way before because non-const basic_string::data is a C++17 feature. (No change requested)

# Conflicts:
#	src/vcpkg/metrics.cpp
@BillyONeal BillyONeal merged commit 3a04019 into microsoft:main Oct 26, 2022
@BillyONeal
Copy link
Member

Thanks :)

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