commit | 64debbe9a4de290c8fb4f3ac9ef87768a379d167 | [log] [tgz] |
---|---|---|
author | Jose Dapena Paz <jose.dapena@lge.com> | Wed Jun 06 11:31:11 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jun 06 11:31:11 2018 |
tree | 075ed49d62378dc486e51e9edb768579b2b94663 | |
parent | c521c66c2c49f582b339003b22e920369b213ab3 [diff] |
GCC: fix ambiguous auto assignment from initializer list Fix build error in GCC due to an ambiguous auto resolution. An initializer list is not compatible with an std::vector in a ? : sequence, so it will fail to resolve the subsequent auto statement: ../../components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.cc -o obj/components/subresource_filter/content/browser/browser/subresource_filter_safe_browsing_activation_throttle.o ../../components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.cc: In member function ‘void subresource_filter::SubresourceFilterSafeBrowsingActivationThrottle::NotifyResult()’: ../../components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.cc:141:26: error: operands to ?: have different types ‘std::vector<subresource_filter::SubresourceFilterSafeBrowsingClient::CheckResult>’ and ‘const std::initializer_list<const subresource_filter::SubresourceFilterSafeBrowsingClient::CheckResult>’ consider_redirects ? check_results_ : last_result_array; ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.cc:145:37: error: unable to deduce ‘auto&&’ from ‘check_results_to_consider’ for (const auto& current_result : check_results_to_consider) { ^~~~~~~~~~~~~~~~~~~~~~~~~ The solution is explicitely setting the type instead of using auto, so the resolution is not ambiguous. Bug: 819294 Change-Id: Ieae11f751569ffe15a5db49833153478eed4cbcb Reviewed-on: https://chromium-review.googlesource.com/1087958 Commit-Queue: Balazs Engedy <engedy@chromium.org> Reviewed-by: Balazs Engedy <engedy@chromium.org> Cr-Commit-Position: refs/heads/master@{#564853}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .