[btree] When using lower_bound() assign to an int rather than unsigned

Patch from Ming-Hung Tsai
This commit is contained in:
Joe Thornber 2015-05-26 14:24:55 +01:00
parent cf903cfea6
commit c8d8af488f

View File

@ -608,9 +608,13 @@ namespace persistent_data {
}
mi = leaf.lower_bound(key);
if (!mi || *mi < 0)
return boost::optional<leaf_type>();
{
int lb = leaf.lower_bound(key);
if (lb < 0)
return boost::optional<leaf_type>();
mi = lb;
}
node_ref<block_traits> internal = spine.template get_node<block_traits>();
block = internal.value_at(*mi);