Skip to content

Commit

Permalink
libstdc++: Don't use const members in std::vector in password_manager…
Browse files Browse the repository at this point in the history
…::CredentialUIEntry

Otherwise build fails when building with use_custom_libcxx=false.
The error example:
std::vector must have a non-const, non-volatile value_type

Implementation of std::vector in libstdc++ does not allow const.

Bug: 957519
Change-Id: I089de2d52df25138d74dbf01fdf61d6301b4d871
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111037
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1084697}
  • Loading branch information
Ivan Murashov authored and Chromium LUCI CQ committed Dec 17, 2022
1 parent 1203dfd commit b4e56d2
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -97,7 +97,7 @@ CredentialUIEntry::CredentialUIEntry(const std::vector<PasswordForm>& forms) {
// For cases when the notes differ within grouped passwords (e.g: a
// credential exists in both account and profile stores), respective notes
// should be concatenated and linebreak used as a delimiter.
std::vector<const std::u16string> notes_with_duplicates;
std::vector<std::u16string> notes_with_duplicates;
for (const auto& form : forms) {
// Only notes with an empty `unique_display_name` are supported in the
// settings UI.
Expand All @@ -109,7 +109,7 @@ CredentialUIEntry::CredentialUIEntry(const std::vector<PasswordForm>& forms) {
}
auto unique_notes =
base::MakeFlatSet<std::u16string>(std::move(notes_with_duplicates));
note = base::JoinString(std::vector<const std::u16string>(
note = base::JoinString(std::vector<std::u16string>(
unique_notes.begin(), unique_notes.end()),
u"\n");

Expand Down

0 comments on commit b4e56d2

Please sign in to comment.