From c4b837b045ec763fe5194dbdb92ad5ebb8705b77 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Sat, 19 Jan 2019 14:07:07 +0100 Subject: [PATCH] time to embrace #pragma once --- coeffs.hh | 5 +---- complex.hh | 4 +--- const.hh | 5 +---- fft.hh | 4 +--- filter.hh | 5 +---- kahan.hh | 5 +---- pcm.hh | 5 +---- regression.hh | 5 +---- resampler.hh | 6 +----- spline.hh | 5 +---- utils.hh | 5 +---- wav.hh | 5 +---- window.hh | 5 +---- 13 files changed, 13 insertions(+), 51 deletions(-) diff --git a/coeffs.hh b/coeffs.hh index d84118c..71ba486 100644 --- a/coeffs.hh +++ b/coeffs.hh @@ -4,8 +4,7 @@ Coefficient array helper Copyright 2018 Ahmet Inan */ -#ifndef COEFFS_HH -#define COEFFS_HH +#pragma once namespace DSP { @@ -45,5 +44,3 @@ public: } -#endif - diff --git a/complex.hh b/complex.hh index 16470e0..797a938 100644 --- a/complex.hh +++ b/complex.hh @@ -4,8 +4,7 @@ Fast complex math Copyright 2018 Ahmet Inan */ -#ifndef COMPLEX_HH -#define COMPLEX_HH +#pragma once template class Complex @@ -119,4 +118,3 @@ static constexpr T arg(Complex a) return atan2(a.imag(), a.real()); } -#endif diff --git a/const.hh b/const.hh index 0d1e9b3..911573e 100644 --- a/const.hh +++ b/const.hh @@ -6,8 +6,7 @@ Constants below are the result of truncating the output of "bc -l" computed with Copyright 2018 Ahmet Inan */ -#ifndef CONST_HH -#define CONST_HH +#pragma once namespace DSP { @@ -63,5 +62,3 @@ struct Const } -#endif - diff --git a/fft.hh b/fft.hh index 25c5697..4a2cf01 100644 --- a/fft.hh +++ b/fft.hh @@ -4,8 +4,7 @@ Mixed-radix decimation-in-time fast Fourier transform Copyright 2018 Ahmet Inan */ -#ifndef FFT_HH -#define FFT_HH +#pragma once #include "unit_circle.hh" #include "const.hh" @@ -1128,4 +1127,3 @@ public: } -#endif diff --git a/filter.hh b/filter.hh index dc0fc0d..dd1b1d3 100644 --- a/filter.hh +++ b/filter.hh @@ -4,8 +4,7 @@ Some finite impulse response filter functions Copyright 2018 Ahmet Inan */ -#ifndef FILTER_HH -#define FILTER_HH +#pragma once #include "const.hh" #include "utils.hh" @@ -57,5 +56,3 @@ public: } -#endif - diff --git a/kahan.hh b/kahan.hh index d096ab9..6083c1b 100644 --- a/kahan.hh +++ b/kahan.hh @@ -4,8 +4,7 @@ Kahan summation algorithm Copyright 2018 Ahmet Inan */ -#ifndef KAHAN_HH -#define KAHAN_HH +#pragma once namespace DSP { @@ -55,5 +54,3 @@ T kahan_sum(I begin, I end, T init) } -#endif - diff --git a/pcm.hh b/pcm.hh index d7b950e..24f2f4f 100644 --- a/pcm.hh +++ b/pcm.hh @@ -4,8 +4,7 @@ Interface for reading and writing PCM data Copyright 2018 Ahmet Inan */ -#ifndef PCM_HH -#define PCM_HH +#pragma once namespace DSP { @@ -34,5 +33,3 @@ struct ReadPCM } -#endif - diff --git a/regression.hh b/regression.hh index 28742a1..cef7960 100644 --- a/regression.hh +++ b/regression.hh @@ -4,8 +4,7 @@ Regression analysis Copyright 2018 Ahmet Inan */ -#ifndef REGRESSION_HH -#define REGRESSION_HH +#pragma once namespace DSP { @@ -53,5 +52,3 @@ public: } -#endif - diff --git a/resampler.hh b/resampler.hh index 4353135..7998e9f 100644 --- a/resampler.hh +++ b/resampler.hh @@ -4,9 +4,7 @@ Resampling by an arbitrary rate difference Copyright 2018 Ahmet Inan */ - -#ifndef RESAMPLER_HH -#define RESAMPLER_HH +#pragma once #include "window.hh" #include "spline.hh" @@ -52,5 +50,3 @@ public: } -#endif - diff --git a/spline.hh b/spline.hh index b0cd7a6..4438dc8 100644 --- a/spline.hh +++ b/spline.hh @@ -4,8 +4,7 @@ Some spline algorithms Copyright 2018 Ahmet Inan */ -#ifndef SPLINE_HH -#define SPLINE_HH +#pragma once namespace DSP { @@ -55,5 +54,3 @@ public: } -#endif - diff --git a/utils.hh b/utils.hh index 415ff3e..28bb35c 100644 --- a/utils.hh +++ b/utils.hh @@ -4,8 +4,7 @@ Some little helpers Copyright 2018 Ahmet Inan */ -#ifndef UTILS_HH -#define UTILS_HH +#pragma once #include "const.hh" @@ -49,5 +48,3 @@ TYPE decibel(TYPE v) } -#endif - diff --git a/wav.hh b/wav.hh index 9786502..ad58b0f 100644 --- a/wav.hh +++ b/wav.hh @@ -4,8 +4,7 @@ Read and write WAV files Copyright 2018 Ahmet Inan */ -#ifndef WAV_HH -#define WAV_HH +#pragma once #include #include "pcm.hh" @@ -231,5 +230,3 @@ public: } -#endif - diff --git a/window.hh b/window.hh index bc2e0f4..e7adf59 100644 --- a/window.hh +++ b/window.hh @@ -4,8 +4,7 @@ Some window functions Copyright 2018 Ahmet Inan */ -#ifndef WINDOW_HH -#define WINDOW_HH +#pragma once #include "const.hh" #include "kahan.hh" @@ -116,5 +115,3 @@ public: } -#endif -