Commit 612077a0 authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

libstdc++: do not pass const types to std::vector in autofill structured address component.

libstdc++ std::vector does not allow const value types:
/usr/include/c++/9/bits/stl_vector.h: In instantiation of ‘class std::vector<const std::__cxx11::basic_string<short unsigned int, base::string16_internals::string16_char_traits> >’:
../../components/autofill/core/browser/data_model/autofill_structured_address_component.cc:436:37:   required from here
/usr/include/c++/9/bits/stl_vector.h:398:66: error: static assertion failed: std::vector must have a non-const, non-volatile value_type

Bug: 957519
Change-Id: I0887c89a185749014a180cca8aec20f646bd16b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2317192Reviewed-by: default avatarParastoo Geranmayeh <parastoog@google.com>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#791445}
parent 0108402e
......@@ -433,7 +433,7 @@ base::string16 AddressComponent::ReplacePlaceholderTypesWithValues(
result_pieces.reserve(10);
// Store the inserted values to allow the used StringPieces to stay valid.
std::vector<const base::string16> inserted_values;
std::vector<base::string16> inserted_values;
inserted_values.reserve(4);
// Use a StringPiece rather than the string since this allows for getting
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment