mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-23 04:44:53 -04:00
Define _USE_MATH_DEFINES and clean M_PI redefinitions
This commit is contained in:
parent
a9d09e30a8
commit
1e5ae8ea0f
@ -58,6 +58,11 @@ add_definitions("-DCOPYRIGHT=\"${COPYRIGHT}\"")
|
||||
set(IDENTIFIER "com.${COMPANY}.${APPLICATION_NAME}")
|
||||
add_definitions("-DIDENTIFIER=\"${IDENTIFIER}\"")
|
||||
|
||||
add_compile_definitions(_USE_MATH_DEFINES)
|
||||
if(WIN32)
|
||||
add_compile_definitions(NOMINMAX)
|
||||
endif()
|
||||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/")
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags
|
||||
|
@ -16,7 +16,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
|
||||
#include "device/deviceuiset.h"
|
||||
|
@ -19,15 +19,10 @@
|
||||
#include "../../channelrx/demodbfm/rdsdemod.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#undef M_PI_2
|
||||
#define M_PI_2 1.57079632679489661923
|
||||
|
||||
const Real RDSDemod::m_pllBeta = 50;
|
||||
const Real RDSDemod::m_fsc = 1187.5;
|
||||
|
||||
|
@ -17,17 +17,14 @@
|
||||
#ifndef LEANSDR_DVB_H
|
||||
#define LEANSDR_DVB_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
|
||||
#include "leansdr/convolutional.h"
|
||||
#include "leansdr/rs.h"
|
||||
#include "leansdr/sdr.h"
|
||||
#include "leansdr/viterbi.h"
|
||||
|
||||
#ifndef M_PI
|
||||
# define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
namespace leansdr
|
||||
{
|
||||
|
||||
|
@ -17,13 +17,9 @@
|
||||
#ifndef LEANSDR_MATH_H
|
||||
#define LEANSDR_MATH_H
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef M_PI
|
||||
# define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
namespace leansdr
|
||||
{
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <complex.h>
|
||||
|
||||
#include <QTime>
|
||||
|
@ -15,7 +15,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include "packetmodbpfdialog.h"
|
||||
#include "ui_packetmodbpfdialog.h"
|
||||
|
@ -15,9 +15,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <errno.h>
|
||||
#include "testsourceworker.h"
|
||||
|
||||
|
@ -25,8 +25,7 @@
|
||||
#ifndef SDRBASE_AUDIO_AUDIOCOMPRESSORSND_H_
|
||||
#define SDRBASE_AUDIO_AUDIOCOMPRESSORSND_H_
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
// maximum number of samples in the delay buffer
|
||||
#define AUDIOCOMPRESSORSND_SF_COMPRESSOR_MAXDELAY 1024
|
||||
@ -161,7 +160,7 @@ private:
|
||||
|
||||
static inline float fixf(float v, float def){
|
||||
// fix NaN and infinity values that sneak in... not sure why this is needed, but it is
|
||||
if (isnan(v) || isinf(v))
|
||||
if (std::isnan(v) || std::isinf(v))
|
||||
return def;
|
||||
return v;
|
||||
}
|
||||
|
@ -15,8 +15,7 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -15,11 +15,9 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "dsp/afsquelch.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
AFSquelch::AFSquelch() :
|
||||
m_nbAvg(128),
|
||||
|
@ -17,7 +17,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
|
||||
#include "dsp/ctcssdetector.h"
|
||||
|
@ -6,12 +6,11 @@
|
||||
#define _FFTFILT_H
|
||||
|
||||
#include <complex>
|
||||
#include <cmath>
|
||||
|
||||
#include "gfft.h"
|
||||
#include "export.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class SDRBASE_API fftfilt {
|
||||
|
@ -20,14 +20,10 @@
|
||||
#define INCLUDE_FFTWINDOW_H
|
||||
|
||||
#include <vector>
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "dsp/dsptypes.h"
|
||||
#include "export.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
class SDRBASE_API FFTWindow {
|
||||
public:
|
||||
enum Function {
|
||||
|
@ -18,8 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "dsp/dsptypes.h"
|
||||
#include "export.h"
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include <QDebug>
|
||||
#include "dsp/fmpreemphasis.h"
|
||||
|
@ -22,8 +22,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "freqlockcomplex.h"
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
FreqLockComplex::FreqLockComplex() :
|
||||
m_a0(0.998),
|
||||
|
@ -1,5 +1,4 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include "dsp/interpolator.h"
|
||||
|
||||
|
@ -24,10 +24,7 @@
|
||||
#ifndef _MISC_H
|
||||
#define _MISC_H
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#include <cmath>
|
||||
|
||||
inline float sinc(float x)
|
||||
{
|
||||
|
@ -17,13 +17,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <stdio.h>
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
#include "dsp/nco.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
Real NCO::m_table[NCO::TableSize];
|
||||
bool NCO::m_tableInitialized = false;
|
||||
|
@ -17,13 +17,9 @@
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <stdio.h>
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "dsp/ncof.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
Real NCOF::m_table[NCOF::TableSize+1];
|
||||
bool NCOF::m_tableInitialized = false;
|
||||
float NCOF::m_tableSizeLimit = (float) NCOF::TableSize;
|
||||
|
@ -19,11 +19,9 @@
|
||||
#ifndef INCLUDE_DSP_PHASEDISCRI_H_
|
||||
#define INCLUDE_DSP_PHASEDISCRI_H_
|
||||
|
||||
#include <cmath>
|
||||
#include "dsp/dsptypes.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
class PhaseDiscriminators
|
||||
{
|
||||
public:
|
||||
@ -167,8 +165,8 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#define PI_FLOAT 3.14159265f
|
||||
#define PIBY2_FLOAT 1.5707963f
|
||||
#define PI_FLOAT float(M_PI)
|
||||
#define PIBY2_FLOAT float(M_PI_2)
|
||||
// |error| < 0.005
|
||||
float atan2_approximation2( float y, float x )
|
||||
{
|
||||
|
@ -16,11 +16,9 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "dsp/phaselock.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
// Construct phase-locked loop.
|
||||
PhaseLock::PhaseLock(Real freq, Real bandwidth, Real minsignal)
|
||||
|
@ -22,8 +22,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <complex.h>
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "phaselockcomplex.h"
|
||||
|
||||
PhaseLockComplex::PhaseLockComplex() :
|
||||
|
@ -16,8 +16,7 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "projector.h"
|
||||
|
||||
Projector::Projector(ProjectionType projectionType) :
|
||||
|
@ -19,8 +19,7 @@
|
||||
#ifndef INCLUDE_RAISEDCOSINE_H
|
||||
#define INCLUDE_RAISEDCOSINE_H
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "dsp/dsptypes.h"
|
||||
|
||||
// Raised-cosine low-pass filter for pulse shaping, without intersymbol interference (ISI)
|
||||
|
@ -15,12 +15,9 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "recursivefilters.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
SecondOrderRecursiveFilter::SecondOrderRecursiveFilter(float samplingFrequency, float centerFrequency, float r) :
|
||||
m_r(r),
|
||||
m_frequencyRatio(centerFrequency/samplingFrequency),
|
||||
|
@ -4,15 +4,13 @@
|
||||
http://www.iowahills.com
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <new>
|
||||
#include <iostream>
|
||||
|
||||
#include "wfir.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#define M_2PI 6.28318530717958647692
|
||||
#define M_2PI (2*M_PI)
|
||||
|
||||
// This first calculates the impulse response for a rectangular window.
|
||||
// It then applies the windowing function of choice to the impulse response.
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "azel.h"
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
|
||||
// Calculate cartesian distance between two points
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
@ -37,8 +37,6 @@
|
||||
#include "util/message.h"
|
||||
#include "util/doublebuffer.h"
|
||||
|
||||
#undef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
class GLScope;
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include "fmpreemphasisdialog.h"
|
||||
#include "ui_fmpreemphasisdialog.h"
|
||||
|
Loading…
Reference in New Issue
Block a user