1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-28 18:58:48 -05:00

Mark log2fapprox as const.

This commit is contained in:
srcejon 2024-03-04 15:51:03 +00:00
parent 0b372d983e
commit 84e091a1b2
2 changed files with 2 additions and 2 deletions

View File

@ -1098,7 +1098,7 @@ void SpectrumVis::webapiUpdateSpectrumSettings(
// so we can use the following approximation to get a good speed-up for both compilers:
// https://www.vplesko.com/posts/replacing_log2f.html
// https://www.vplesko.com/assets/replacing_log2f/main.c.txt
float SpectrumVis::log2fapprox(float x)
float SpectrumVis::log2fapprox(float x) const
{
// IEEE 754 representation constants.
const int32_t mantissaLen = 23;

View File

@ -259,7 +259,7 @@ private:
void handleScalef(Real scalef);
void handleWSOpenClose(bool openClose);
void handleConfigureWSSpectrum(const QString& address, uint16_t port);
float log2fapprox(float x);
float log2fapprox(float x) const;
static void webapiFormatSpectrumSettings(SWGSDRangel::SWGGLSpectrum& response, const SpectrumSettings& settings);
static void webapiUpdateSpectrumSettings(