Commit bb31c18d authored by deepak1556's avatar deepak1556 Committed by Commit Bot

build,[win]: fix ambiguous reference with MSSTL

size is defined in `<xutility>` with VS 2019

Bug: none
Change-Id: I337599b8808f36d2c2c3ad1b327352d440c9dea3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879683
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710491}
parent fc81db81
...@@ -43,7 +43,7 @@ constexpr CommandLine::StringPieceType kSwitchPrefixes[] = {L"--", L"-", L"/"}; ...@@ -43,7 +43,7 @@ constexpr CommandLine::StringPieceType kSwitchPrefixes[] = {L"--", L"-", L"/"};
// Unixes don't use slash as a switch. // Unixes don't use slash as a switch.
constexpr CommandLine::StringPieceType kSwitchPrefixes[] = {"--", "-"}; constexpr CommandLine::StringPieceType kSwitchPrefixes[] = {"--", "-"};
#endif #endif
size_t switch_prefix_count = size(kSwitchPrefixes); size_t switch_prefix_count = base::size(kSwitchPrefixes);
size_t GetSwitchPrefixLength(CommandLine::StringPieceType string) { size_t GetSwitchPrefixLength(CommandLine::StringPieceType string) {
for (size_t i = 0; i < switch_prefix_count; ++i) { for (size_t i = 0; i < switch_prefix_count; ++i) {
...@@ -201,7 +201,7 @@ void CommandLine::set_slash_is_not_a_switch() { ...@@ -201,7 +201,7 @@ void CommandLine::set_slash_is_not_a_switch() {
// The last switch prefix should be slash, so adjust the size to skip it. // The last switch prefix should be slash, so adjust the size to skip it.
static_assert(base::make_span(kSwitchPrefixes).back() == L"/", static_assert(base::make_span(kSwitchPrefixes).back() == L"/",
"Error: Last switch prefix is not a slash."); "Error: Last switch prefix is not a slash.");
switch_prefix_count = size(kSwitchPrefixes) - 1; switch_prefix_count = base::size(kSwitchPrefixes) - 1;
} }
// static // static
......
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