mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
cleanup
* make a local variable for target_table->field[col] * move an often-used bit function to my_bit.h * remove a non-static and not really needed trivial comparison function with a very generic name
This commit is contained in:
@@ -121,6 +121,15 @@ static inline uint32 my_reverse_bits(uint32 key)
|
||||
_my_bits_reverse_table[(key>>24) ];
|
||||
}
|
||||
|
||||
/*
|
||||
a number with the n lowest bits set
|
||||
an overflow-safe version of (1 << n) - 1
|
||||
*/
|
||||
static inline uint32 my_set_bits(int n)
|
||||
{
|
||||
return (((1UL << (n - 1)) - 1) << 1) | 1;
|
||||
}
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MY_BIT_INCLUDED */
|
||||
|
Reference in New Issue
Block a user