Skip to content

Commit

Permalink
MSVC: fixed compiler warnings and a bogus assertion failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
psiha committed Oct 11, 2024
1 parent 7bc393c commit c6b3134
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/psi/vm/containers/b+tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ class bptree_base_wkey : public bptree_base
// TODO support for maps (i.e. keys+values)
using value_type = Key;

static node_size_type constexpr storage_space{ node_size - align_up( sizeof( node_header ), alignof( Key ) ) };
static node_size_type constexpr storage_space{ node_size - align_up<node_size_type>( sizeof( node_header ), alignof( Key ) ) };
static node_size_type constexpr max_values { storage_space / sizeof( Key ) };
static node_size_type constexpr min_values { ihalf_ceil<max_values> };

Expand Down Expand Up @@ -1014,7 +1014,7 @@ class bptree_base_wkey : public bptree_base
BOOST_ASSUME( left .right == slot_of( right ) );
BOOST_ASSUME( right.left == slot_of( left ) );

std::ranges::move( keys( right ), keys( left ).end() );
std::ranges::move( keys( right ), &keys( left ).back() + 1 );
left .num_vals += right.num_vals;
right.num_vals = 0;
BOOST_ASSUME( left.num_vals >= 2 * min - 2 );
Expand Down Expand Up @@ -1551,10 +1551,10 @@ class bp_tree
if ( less_than_right_pos != copy_size )
{
BOOST_ASSUME( less_than_right_pos < copy_size );
auto const input_end_for_target{ less_than_right_pos + source_offset };
node_size_type const input_end_for_target( less_than_right_pos + source_offset );
BOOST_ASSUME( input_end_for_target > source_offset );
BOOST_ASSUME( input_end_for_target <= source.num_vals );
copy_size = input_end_for_target - source_offset;
copy_size = static_cast<node_size_type>( input_end_for_target - source_offset );
}
}

Expand Down

0 comments on commit c6b3134

Please sign in to comment.