Commit 4d2ff381 by Abseil Team Committed by Andy Getz

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
parent c03c18e7
...@@ -1014,6 +1014,7 @@ class btree { ...@@ -1014,6 +1014,7 @@ class btree {
using node_type = btree_node<Params>; using node_type = btree_node<Params>;
using is_key_compare_to = typename Params::is_key_compare_to; using is_key_compare_to = typename Params::is_key_compare_to;
using init_type = typename Params::init_type; 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 // We use a static empty node for the root/leftmost/rightmost of empty btrees
// in order to avoid branching in begin()/end(). // in order to avoid branching in begin()/end().
...@@ -2432,7 +2433,7 @@ inline auto btree<P>::internal_emplace(iterator iter, Args &&... args) ...@@ -2432,7 +2433,7 @@ inline auto btree<P>::internal_emplace(iterator iter, Args &&... args)
--iter; --iter;
++iter.position; ++iter.position;
} }
const int max_count = iter.node->max_count(); const field_type max_count = iter.node->max_count();
allocator_type *alloc = mutable_allocator(); allocator_type *alloc = mutable_allocator();
if (iter.node->count() == max_count) { if (iter.node->count() == max_count) {
// Make room in the leaf for the new item. // Make room in the leaf for the new item.
......
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