Ticket #9725: db.patch

File db.patch, 996 bytes (added by Thomas Klausner <tk@…>, 9 years ago)

Patch adding casts that fixes the warnings.

  • (a) /usr/pkg/include/boost/dynamic_bitset/dynamic_bitset.hpp.orig vs. (b) dynamic_bitset.hpp

    a b  
    12301230    if (i >= num_blocks())
    12311231        return npos; // not found
    12321232
    1233     return i * bits_per_block + boost::lowest_bit(m_bits[i]);
     1233    return i * bits_per_block + static_cast<size_type>(boost::lowest_bit(m_bits[i]));
    12341234
    12351235}
    12361236
     
    12611261    const Block fore = m_bits[blk] & ( ~Block(0) << ind );
    12621262
    12631263    return fore?
    1264         blk * bits_per_block + lowest_bit(fore)
     1264        blk * bits_per_block + static_cast<size_type>(lowest_bit(fore))
    12651265        :
    12661266        m_do_find_from(blk + 1);
    12671267
     
    16941694dynamic_bitset<Block, Allocator>::calc_num_blocks(size_type num_bits)
    16951695{
    16961696    return num_bits / bits_per_block
    1697            + static_cast<int>( num_bits % bits_per_block != 0 );
     1697           + static_cast<size_type>( num_bits % bits_per_block != 0 );
    16981698}
    16991699
    17001700// gives a reference to the highest block