Commit aa87eed2 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

Fix two errors reported by gcc.

parent df2b7bf8
......@@ -22,7 +22,7 @@ using std::cerr; using std::endl;
static const ulong_int_t bit_values[32] =
{1, 2, 4, 8, 16, 32, 64, 128, 256, 1<<9, 1<<10, 1<<11, 1<<12, 1<<13, 1<<14,
1<<15, 1<<16, 1<<17, 1<<18, 1<<19, 1<<20, 1<<21, 1<<22, 1<<23, 1<<24,
1<<25, 1<<26, 1<<27, 1<<28, 1<<29, 1<<30, 1<<31};
1<<25, 1<<26, 1<<27, 1<<28, 1<<29, 1<<30, 1U<<31};
//!Class for impementation of field of bits
......@@ -116,11 +116,11 @@ class bit_string_t
*/
size_int_t get_allocated_4bytes_count() const
{ return allocated; }
//!Returns a count of allocated bits
size_int_t get_bit_count() const
{ return bits; }
//!Prints a sequence of zeros and ones representing a content
//! to output stream `outs'.
void DBG_print(std::ostream & outs = cerr) const
......@@ -131,14 +131,14 @@ class bit_string_t
if (get_bit(i)) outs << '1'; else outs << '0';
outs << endl;
}
//!Bitwisely adds `from' to (*this)
void add(const bit_string_t & from)
{
for (size_int_t i = 0; i!= allocated; ++i)
mem[i] = mem[i] | from.mem[i];
}
//!Returns true iff (`bs1' & `bs2') != 0
friend bool operator&(const bit_string_t & bs1, const bit_string_t & bs2)
{
......@@ -146,7 +146,7 @@ class bit_string_t
if (bs1.mem[i] & bs2.mem[i]) return false;
return true;
}
//!Returns true iff (`bs1' | `bs2') != 0
friend bool operator|(const bit_string_t & bs1, const bit_string_t & bs2)
{
......@@ -154,7 +154,7 @@ class bit_string_t
if (bs1.mem[i] | bs2.mem[i]) return false;
return true;
}
//!Returns true iff (`bs1' xor `bs2') != 0
friend bool operator^(const bit_string_t & bs1, const bit_string_t & bs2)
{
......
This diff is collapsed.
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