diff options
author | Abseil Team <absl-team@google.com> | 2020-08-26 18:55:00 -0700 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2020-08-27 15:39:25 -0400 |
commit | 4d2ff381a3709ef9dd4cbc0237bae847c0bb1ccd (patch) | |
tree | df09e2fb35a926be037ff03bf270ae8558d5bdb6 /absl/container | |
parent | c03c18e7fef8d06eb6c445f5607af533e69cadfe (diff) |
Export of internal Abseil changes
--
ec39082e792ef7bb17e8432b6e10d1cb96dbad24 by Derek Mauro <dmauro@google.com>:
Fix a sign-compare warning in btree.h
Fixes #771
PiperOrigin-RevId: 328653403
GitOrigin-RevId: ec39082e792ef7bb17e8432b6e10d1cb96dbad24
Change-Id: I6b681dcda4fd8933257b06d0428d40b1d01f6ad1
Diffstat (limited to 'absl/container')
-rw-r--r-- | absl/container/internal/btree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/container/internal/btree.h b/absl/container/internal/btree.h index 4d405734..5986bb21 100644 --- a/absl/container/internal/btree.h +++ b/absl/container/internal/btree.h @@ -1014,6 +1014,7 @@ class btree { using node_type = btree_node<Params>; using is_key_compare_to = typename Params::is_key_compare_to; using init_type = typename Params::init_type; + using field_type = typename node_type::field_type; // We use a static empty node for the root/leftmost/rightmost of empty btrees // in order to avoid branching in begin()/end(). @@ -2432,7 +2433,7 @@ inline auto btree<P>::internal_emplace(iterator iter, Args &&... args) --iter; ++iter.position; } - const int max_count = iter.node->max_count(); + const field_type max_count = iter.node->max_count(); allocator_type *alloc = mutable_allocator(); if (iter.node->count() == max_count) { // Make room in the leaf for the new item. |