Commit 9662ec84 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Fix GCC build error

Fixes this error:
[  375s] In file included from ../../base/task/common/intrusive_heap.h:8,
[  375s]                  from ../../base/task/thread_pool/task_source.h:17,
[  375s]                  from ../../base/task/thread_pool/task_tracker.h:27,
[  375s]                  from ./../../base/task/thread_pool/service_thread.cc:14,
[  375s]                  from gen/base/base_jumbo_28.cc:5:
[  375s] ../../base/containers/intrusive_heap.h:152:36: error: enumerator value
         '-1' is outside the range of underlying type 'size_t' {aka 'long unsigned int'}
[  375s]   152 |   enum : size_t { kInvalidIndex = -1 };
[  375s]       |

Change-Id: I6044fb704931b2f8416f6b19a247ae297cd7b0d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792763
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694853}
parent 8bb6cc36
......@@ -131,6 +131,7 @@
#include <algorithm>
#include <functional>
#include <limits>
#include <type_traits>
#include <utility>
#include <vector>
......@@ -149,7 +150,7 @@ namespace base {
// in place.
class BASE_EXPORT HeapHandle {
public:
enum : size_t { kInvalidIndex = -1 };
enum : size_t { kInvalidIndex = std::numeric_limits<size_t>::max() };
constexpr HeapHandle() = default;
constexpr HeapHandle(const HeapHandle& other) = default;
......
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