Commit 7567ac73 authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Explicitly convert from size_t to uint32_t

VS 15.7 (VS 2017 Update 7) warns on a conversion from size_t to uint32_t
class BreakList. This was probably avoided in previous compiler versions
because of how VS handled templates, which they are now fixing.

Adding an explicit cast avoids the warning.

Change-Id: Ib9dadbe079b57bfe0a37324858a912f8f9c1cb94
Reviewed-on: https://chromium-review.googlesource.com/978956Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546040}
parent 3472e079
...@@ -89,7 +89,7 @@ void BreakList<T>::ApplyValue(T value, const Range& range) { ...@@ -89,7 +89,7 @@ void BreakList<T>::ApplyValue(T value, const Range& range) {
return; return;
DCHECK(!breaks_.empty()); DCHECK(!breaks_.empty());
DCHECK(!range.is_reversed()); DCHECK(!range.is_reversed());
DCHECK(Range(0, max_).Contains(range)); DCHECK(Range(0, static_cast<uint32_t>(max_)).Contains(range));
// Erase any breaks in |range|, then add start and end breaks as needed. // Erase any breaks in |range|, then add start and end breaks as needed.
typename std::vector<Break>::iterator start = GetBreak(range.start()); typename std::vector<Break>::iterator start = GetBreak(range.start());
......
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