From 1ef45efc4aa536082d565fddb780fb711c50a73d Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 3 Mar 2022 23:24:31 +0100 Subject: [PATCH] use inline instead of static for code that is header only --- sdrbase/util/poweroftwo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdrbase/util/poweroftwo.h b/sdrbase/util/poweroftwo.h index 86141eb4c..a0c09eb99 100644 --- a/sdrbase/util/poweroftwo.h +++ b/sdrbase/util/poweroftwo.h @@ -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);