mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-23 12:48:49 -04:00
use inline instead of static for code that is header only
This commit is contained in:
parent
22381c5dbc
commit
1ef45efc4a
@ -22,14 +22,14 @@
|
||||
|
||||
// Is x a power of two
|
||||
// From: https://stackoverflow.com/questions/600293/how-to-check-if-a-number-is-a-power-of-2
|
||||
static bool isPowerOfTwo(uint32_t x)
|
||||
inline bool isPowerOfTwo(uint32_t x)
|
||||
{
|
||||
return (x & (x - 1)) == 0;
|
||||
}
|
||||
|
||||
// Calculate next power of 2 lower than x
|
||||
// From: https://stackoverflow.com/questions/2679815/previous-power-of-2
|
||||
static uint32_t lowerPowerOfTwo(uint32_t x)
|
||||
inline uint32_t lowerPowerOfTwo(uint32_t x)
|
||||
{
|
||||
x = x | (x >> 1);
|
||||
x = x | (x >> 2);
|
||||
|
Loading…
Reference in New Issue
Block a user