diff options
author | kcat <[email protected]> | 2019-01-09 17:16:28 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2019-01-09 17:16:28 -0800 |
commit | 30184613a53c9eb013fee10403aa9cd97d4ea5e1 (patch) | |
tree | a3dd40b59196464c12c9d8d585100c5226ffb3b2 | |
parent | 8f35f464a1b3ae1b8772a4645941a1fb2fec006e (diff) | |
parent | f7fe15e1cec05a4c9e6a6a207bdb34397086cffc (diff) |
Merge pull request #264 from ShFil119/impr/cleanup
Cleanup continuation
36 files changed, 117 insertions, 122 deletions
diff --git a/Alc/backends/alsa.cpp b/Alc/backends/alsa.cpp index 5fe8ef96..ef5d6f7c 100644 --- a/Alc/backends/alsa.cpp +++ b/Alc/backends/alsa.cpp @@ -22,8 +22,8 @@ #include "backends/alsa.h" -#include <stdlib.h> -#include <stdio.h> +#include <cstdlib> +#include <cstdio> #include <memory.h> #include <atomic> @@ -204,7 +204,7 @@ ALSA_FUNCS(MAKE_FUNC); #endif -bool alsa_load(void) +bool alsa_load() { bool error{false}; diff --git a/Alc/backends/base.cpp b/Alc/backends/base.cpp index e3753426..ba5e5486 100644 --- a/Alc/backends/base.cpp +++ b/Alc/backends/base.cpp @@ -1,7 +1,7 @@ #include "config.h" -#include <stdlib.h> +#include <cstdlib> #include <thread> @@ -24,8 +24,7 @@ ClockLatency GetClockLatency(ALCdevice *device) BackendBase::BackendBase(ALCdevice *device) noexcept : mDevice{device} { } -BackendBase::~BackendBase() -{ } +BackendBase::~BackendBase() = default; ALCboolean BackendBase::reset() { return ALC_FALSE; } diff --git a/Alc/backends/jack.cpp b/Alc/backends/jack.cpp index 78de2699..c079bb19 100644 --- a/Alc/backends/jack.cpp +++ b/Alc/backends/jack.cpp @@ -22,8 +22,8 @@ #include "backends/jack.h" -#include <stdlib.h> -#include <stdio.h> +#include <cstdlib> +#include <cstdio> #include <memory.h> #include <thread> @@ -100,7 +100,7 @@ decltype(jack_error_callback) * pjack_error_callback; jack_options_t ClientOptions = JackNullOption; -ALCboolean jack_load(void) +ALCboolean jack_load() { ALCboolean error = ALC_FALSE; diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp index cba204f6..38ac0154 100644 --- a/Alc/backends/null.cpp +++ b/Alc/backends/null.cpp @@ -22,7 +22,7 @@ #include "backends/null.h" -#include <stdlib.h> +#include <cstdlib> #ifdef HAVE_WINDOWS_H #include <windows.h> #endif diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp index 05394f34..3634cce9 100644 --- a/Alc/backends/oss.cpp +++ b/Alc/backends/oss.cpp @@ -27,14 +27,14 @@ #include <sys/time.h> #include <sys/stat.h> #include <fcntl.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> +#include <cstdlib> +#include <cstdio> +#include <cstring> #include <memory.h> #include <unistd.h> -#include <errno.h> +#include <cerrno> #include <poll.h> -#include <math.h> +#include <cmath> #include <atomic> #include <thread> diff --git a/Alc/backends/portaudio.cpp b/Alc/backends/portaudio.cpp index 074508b2..f6cf7c05 100644 --- a/Alc/backends/portaudio.cpp +++ b/Alc/backends/portaudio.cpp @@ -22,9 +22,9 @@ #include "backends/portaudio.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include "alMain.h" #include "alu.h" @@ -69,7 +69,7 @@ MAKE_FUNC(Pa_GetStreamInfo); #endif #endif -bool pa_load(void) +bool pa_load() { PaError err; diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp index b717d67a..bf952813 100644 --- a/Alc/backends/pulseaudio.cpp +++ b/Alc/backends/pulseaudio.cpp @@ -23,7 +23,7 @@ #include "backends/pulseaudio.h" -#include <string.h> +#include <cstring> #include <array> #include <string> @@ -186,7 +186,7 @@ MAKE_FUNC(pa_stream_begin_write); #endif -ALCboolean pulse_load(void) +ALCboolean pulse_load() { ALCboolean ret{ALC_TRUE}; #ifdef HAVE_DYNLOAD @@ -599,7 +599,7 @@ void device_sink_callback(pa_context *UNUSED(context), const pa_sink_info *info, TRACE("Got device \"%s\", \"%s\"\n", newentry.name.c_str(), newentry.device_name.c_str()); } -void probePlaybackDevices(void) +void probePlaybackDevices() { PlaybackDevices.clear(); @@ -681,7 +681,7 @@ void device_source_callback(pa_context *UNUSED(context), const pa_source_info *i TRACE("Got device \"%s\", \"%s\"\n", newentry.name.c_str(), newentry.device_name.c_str()); } -void probeCaptureDevices(void) +void probeCaptureDevices() { CaptureDevices.clear(); diff --git a/Alc/backends/wave.cpp b/Alc/backends/wave.cpp index 42b67a19..aa1aab1f 100644 --- a/Alc/backends/wave.cpp +++ b/Alc/backends/wave.cpp @@ -22,10 +22,10 @@ #include "backends/wave.h" -#include <stdlib.h> -#include <stdio.h> +#include <cstdlib> +#include <cstdio> #include <memory.h> -#include <errno.h> +#include <cerrno> #include <chrono> #include <thread> diff --git a/Alc/effects/autowah.cpp b/Alc/effects/autowah.cpp index 7df5d49e..f7d07fe2 100644 --- a/Alc/effects/autowah.cpp +++ b/Alc/effects/autowah.cpp @@ -20,8 +20,8 @@ #include "config.h" -#include <math.h> -#include <stdlib.h> +#include <cmath> +#include <cstdlib> #include <algorithm> @@ -203,7 +203,7 @@ struct AutowahStateFactory final : public EffectStateFactory { EffectState *AutowahStateFactory::create() { return new ALautowahState{}; } -EffectStateFactory *AutowahStateFactory_getFactory(void) +EffectStateFactory *AutowahStateFactory_getFactory() { static AutowahStateFactory AutowahFactory{}; return &AutowahFactory; diff --git a/Alc/effects/chorus.cpp b/Alc/effects/chorus.cpp index 990b3cc4..05216059 100644 --- a/Alc/effects/chorus.cpp +++ b/Alc/effects/chorus.cpp @@ -20,7 +20,7 @@ #include "config.h" -#include <stdlib.h> +#include <cstdlib> #include <cmath> #include <algorithm> @@ -265,7 +265,7 @@ EffectState *ChorusStateFactory::create() } // namespace -EffectStateFactory *ChorusStateFactory_getFactory(void) +EffectStateFactory *ChorusStateFactory_getFactory() { static ChorusStateFactory ChorusFactory{}; return &ChorusFactory; @@ -384,7 +384,7 @@ DEFINE_ALEFFECT_VTABLE(ALchorus); /* Flanger is basically a chorus with a really short delay. They can both use * the same processing functions, so piggyback flanger on the chorus functions. */ -EffectStateFactory *FlangerStateFactory_getFactory(void) +EffectStateFactory *FlangerStateFactory_getFactory() { return ChorusStateFactory_getFactory(); } diff --git a/Alc/effects/compressor.cpp b/Alc/effects/compressor.cpp index 1b840c44..93ab9bbc 100644 --- a/Alc/effects/compressor.cpp +++ b/Alc/effects/compressor.cpp @@ -20,7 +20,7 @@ #include "config.h" -#include <stdlib.h> +#include <cstdlib> #include "alMain.h" #include "alcontext.h" @@ -160,7 +160,7 @@ struct CompressorStateFactory final : public EffectStateFactory { EffectState *CompressorStateFactory::create() { return new ALcompressorState{}; } -EffectStateFactory *CompressorStateFactory_getFactory(void) +EffectStateFactory *CompressorStateFactory_getFactory() { static CompressorStateFactory CompressorFactory{}; return &CompressorFactory; diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp index f9faa63d..64b24e9d 100644 --- a/Alc/effects/dedicated.cpp +++ b/Alc/effects/dedicated.cpp @@ -20,7 +20,7 @@ #include "config.h" -#include <stdlib.h> +#include <cstdlib> #include <cmath> #include <algorithm> @@ -102,7 +102,7 @@ struct DedicatedStateFactory final : public EffectStateFactory { EffectState *DedicatedStateFactory::create() { return new ALdedicatedState{}; } -EffectStateFactory *DedicatedStateFactory_getFactory(void) +EffectStateFactory *DedicatedStateFactory_getFactory() { static DedicatedStateFactory DedicatedFactory{}; return &DedicatedFactory; diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp index 1b9c66fa..12eb12fb 100644 --- a/Alc/effects/distortion.cpp +++ b/Alc/effects/distortion.cpp @@ -20,8 +20,8 @@ #include "config.h" -#include <math.h> -#include <stdlib.h> +#include <cmath> +#include <cstdlib> #include <cmath> @@ -169,7 +169,7 @@ struct DistortionStateFactory final : public EffectStateFactory { EffectState *DistortionStateFactory::create() { return new ALdistortionState{}; } -EffectStateFactory *DistortionStateFactory_getFactory(void) +EffectStateFactory *DistortionStateFactory_getFactory() { static DistortionStateFactory DistortionFactory{}; return &DistortionFactory; diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp index 697d2e88..197e9686 100644 --- a/Alc/effects/echo.cpp +++ b/Alc/effects/echo.cpp @@ -20,8 +20,8 @@ #include "config.h" -#include <math.h> -#include <stdlib.h> +#include <cmath> +#include <cstdlib> #include <algorithm> @@ -180,7 +180,7 @@ struct EchoStateFactory final : public EffectStateFactory { EffectState *EchoStateFactory::create() { return new ALechoState{}; } -EffectStateFactory *EchoStateFactory_getFactory(void) +EffectStateFactory *EchoStateFactory_getFactory() { static EchoStateFactory EchoFactory{}; return &EchoFactory; diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp index defe1485..fc00d00f 100644 --- a/Alc/effects/equalizer.cpp +++ b/Alc/effects/equalizer.cpp @@ -20,8 +20,8 @@ #include "config.h" -#include <math.h> -#include <stdlib.h> +#include <cmath> +#include <cstdlib> #include <algorithm> #include <functional> @@ -184,7 +184,7 @@ struct EqualizerStateFactory final : public EffectStateFactory { EffectState *EqualizerStateFactory::create() { return new ALequalizerState{}; } -EffectStateFactory *EqualizerStateFactory_getFactory(void) +EffectStateFactory *EqualizerStateFactory_getFactory() { static EqualizerStateFactory EqualizerFactory{}; return &EqualizerFactory; diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp index 994dd90c..55ff4247 100644 --- a/Alc/effects/fshifter.cpp +++ b/Alc/effects/fshifter.cpp @@ -46,7 +46,7 @@ using complex_d = std::complex<double>; /* Define a Hann window, used to filter the HIL input and output. */ /* Making this constexpr seems to require C++14. */ -std::array<ALdouble,HIL_SIZE> InitHannWindow(void) +std::array<ALdouble,HIL_SIZE> InitHannWindow() { std::array<ALdouble,HIL_SIZE> ret; /* Create lookup table of the Hann window for the desired size, i.e. HIL_SIZE */ @@ -211,7 +211,7 @@ struct FshifterStateFactory final : public EffectStateFactory { EffectState *FshifterStateFactory::create() { return new ALfshifterState{}; } -EffectStateFactory *FshifterStateFactory_getFactory(void) +EffectStateFactory *FshifterStateFactory_getFactory() { static FshifterStateFactory FshifterFactory{}; return &FshifterFactory; diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp index 9549740e..d9a3046e 100644 --- a/Alc/effects/modulator.cpp +++ b/Alc/effects/modulator.cpp @@ -20,8 +20,8 @@ #include "config.h" -#include <math.h> -#include <stdlib.h> +#include <cmath> +#include <cstdlib> #include <cmath> #include <algorithm> @@ -177,7 +177,7 @@ struct ModulatorStateFactory final : public EffectStateFactory { EffectState *ModulatorStateFactory::create() { return new ALmodulatorState{}; } -EffectStateFactory *ModulatorStateFactory_getFactory(void) +EffectStateFactory *ModulatorStateFactory_getFactory() { static ModulatorStateFactory ModulatorFactory{}; return &ModulatorFactory; diff --git a/Alc/effects/null.cpp b/Alc/effects/null.cpp index fa35b3c4..96cb3114 100644 --- a/Alc/effects/null.cpp +++ b/Alc/effects/null.cpp @@ -1,6 +1,6 @@ #include "config.h" -#include <stdlib.h> +#include <cstdlib> #include "AL/al.h" #include "AL/alc.h" @@ -25,16 +25,12 @@ struct ALnullState final : public EffectState { /* This constructs the effect state. It's called when the object is first * created. */ -ALnullState::ALnullState() -{ -} +ALnullState::ALnullState() = default; /* This destructs the effect state. It's called only when the effect slot is no * longer used prior to being freed. */ -ALnullState::~ALnullState() -{ -} +ALnullState::~ALnullState() = default; /* This updates the device-dependant effect state. This is called on * initialization and any time the device parameters (eg. playback frequency, @@ -69,7 +65,7 @@ struct NullStateFactory final : public EffectStateFactory { EffectState *NullStateFactory::create() { return new ALnullState{}; } -EffectStateFactory *NullStateFactory_getFactory(void) +EffectStateFactory *NullStateFactory_getFactory() { static NullStateFactory NullFactory{}; return &NullFactory; diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp index f0b9de1c..7bd7ada0 100644 --- a/Alc/effects/pshifter.cpp +++ b/Alc/effects/pshifter.cpp @@ -78,7 +78,7 @@ inline int double2int(double d) /* Define a Hann window, used to filter the STFT input and output. */ /* Making this constexpr seems to require C++14. */ -std::array<ALdouble,STFT_SIZE> InitHannWindow(void) +std::array<ALdouble,STFT_SIZE> InitHannWindow() { std::array<ALdouble,STFT_SIZE> ret; /* Create lookup table of the Hann window for the desired size, i.e. HIL_SIZE */ @@ -326,7 +326,7 @@ struct PshifterStateFactory final : public EffectStateFactory { EffectState *PshifterStateFactory::create() { return new ALpshifterState{}; } -EffectStateFactory *PshifterStateFactory_getFactory(void) +EffectStateFactory *PshifterStateFactory_getFactory() { static PshifterStateFactory PshifterFactory{}; return &PshifterFactory; diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp index a63cc4c3..6f007046 100644 --- a/Alc/effects/reverb.cpp +++ b/Alc/effects/reverb.cpp @@ -20,9 +20,9 @@ #include "config.h" -#include <stdio.h> -#include <stdlib.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cmath> #include <cmath> #include <algorithm> @@ -1420,7 +1420,7 @@ EffectState *ReverbStateFactory::create() } // namespace -EffectStateFactory *ReverbStateFactory_getFactory(void) +EffectStateFactory *ReverbStateFactory_getFactory() { static ReverbStateFactory ReverbFactory{}; return &ReverbFactory; diff --git a/Alc/filters/nfc.cpp b/Alc/filters/nfc.cpp index fd98eef0..47af60bd 100644 --- a/Alc/filters/nfc.cpp +++ b/Alc/filters/nfc.cpp @@ -7,7 +7,7 @@ #include "alMain.h" -#include <string.h> +#include <cstring> /* Near-field control filters are the basis for handling the near-field effect. diff --git a/Alc/helpers.cpp b/Alc/helpers.cpp index 88c222bf..13ba3a2a 100644 --- a/Alc/helpers.cpp +++ b/Alc/helpers.cpp @@ -28,11 +28,11 @@ #include "config.h" -#include <stdlib.h> -#include <time.h> -#include <errno.h> -#include <stdarg.h> -#include <ctype.h> +#include <cstdlib> +#include <ctime> +#include <cerrno> +#include <cstdarg> +#include <cctype> #ifdef HAVE_MALLOC_H #include <malloc.h> #endif @@ -93,7 +93,7 @@ DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x #include <sys/sysconf.h> #endif #ifdef HAVE_FLOAT_H -#include <float.h> +#include <cfloat> #endif #ifdef HAVE_IEEEFP_H #include <ieeefp.h> @@ -713,7 +713,7 @@ al::vector<std::string> SearchDataFiles(const char *ext, const char *subdir) return results; } -void SetRTPriority(void) +void SetRTPriority() { bool failed = false; #if defined(HAVE_PTHREAD_SETSCHEDPARAM) && !defined(__OpenBSD__) diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp index 1b16b733..38bb7b64 100644 --- a/Alc/mixer/mixer_c.cpp +++ b/Alc/mixer/mixer_c.cpp @@ -1,6 +1,6 @@ #include "config.h" -#include <assert.h> +#include <cassert> #include <limits> diff --git a/Alc/mixvoice.cpp b/Alc/mixvoice.cpp index e52b330d..7d30ad12 100644 --- a/Alc/mixvoice.cpp +++ b/Alc/mixvoice.cpp @@ -20,11 +20,11 @@ #include "config.h" -#include <math.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <assert.h> +#include <cmath> +#include <cstdlib> +#include <cstring> +#include <cctype> +#include <cassert> #include <numeric> #include <algorithm> @@ -61,7 +61,7 @@ RowMixerFunc MixRowSamples = MixRow_C; static HrtfMixerFunc MixHrtfSamples = MixHrtf_C; static HrtfMixerBlendFunc MixHrtfBlendSamples = MixHrtfBlend_C; -static MixerFunc SelectMixer(void) +static MixerFunc SelectMixer() { #ifdef HAVE_NEON if((CPUCapFlags&CPU_CAP_NEON)) @@ -74,7 +74,7 @@ static MixerFunc SelectMixer(void) return Mix_C; } -static RowMixerFunc SelectRowMixer(void) +static RowMixerFunc SelectRowMixer() { #ifdef HAVE_NEON if((CPUCapFlags&CPU_CAP_NEON)) @@ -87,7 +87,7 @@ static RowMixerFunc SelectRowMixer(void) return MixRow_C; } -static inline HrtfMixerFunc SelectHrtfMixer(void) +static inline HrtfMixerFunc SelectHrtfMixer() { #ifdef HAVE_NEON if((CPUCapFlags&CPU_CAP_NEON)) @@ -100,7 +100,7 @@ static inline HrtfMixerFunc SelectHrtfMixer(void) return MixHrtf_C; } -static inline HrtfMixerBlendFunc SelectHrtfBlendMixer(void) +static inline HrtfMixerBlendFunc SelectHrtfBlendMixer() { #ifdef HAVE_NEON if((CPUCapFlags&CPU_CAP_NEON)) @@ -152,7 +152,7 @@ ResamplerFunc SelectResampler(Resampler resampler) } -void aluInitMixer(void) +void aluInitMixer() { const char *str; diff --git a/Alc/panning.cpp b/Alc/panning.cpp index 99a0534f..9c92a166 100644 --- a/Alc/panning.cpp +++ b/Alc/panning.cpp @@ -20,11 +20,11 @@ #include "config.h" -#include <math.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <assert.h> +#include <cmath> +#include <cstdlib> +#include <cstring> +#include <cctype> +#include <cassert> #include <cmath> #include <numeric> diff --git a/Alc/ringbuffer.cpp b/Alc/ringbuffer.cpp index 21884f6c..7f0aa630 100644 --- a/Alc/ringbuffer.cpp +++ b/Alc/ringbuffer.cpp @@ -20,9 +20,9 @@ #include "config.h" -#include <string.h> -#include <stdlib.h> -#include <limits.h> +#include <cstring> +#include <cstdlib> +#include <climits> #include <algorithm> diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp index 55f5649c..fd5795e6 100644 --- a/OpenAL32/alAuxEffectSlot.cpp +++ b/OpenAL32/alAuxEffectSlot.cpp @@ -20,8 +20,8 @@ #include "config.h" -#include <stdlib.h> -#include <math.h> +#include <cstdlib> +#include <cmath> #include <thread> #include <algorithm> diff --git a/OpenAL32/alBuffer.cpp b/OpenAL32/alBuffer.cpp index 9781ea0c..85871573 100644 --- a/OpenAL32/alBuffer.cpp +++ b/OpenAL32/alBuffer.cpp @@ -20,9 +20,9 @@ #include "config.h" -#include <stdlib.h> -#include <stdio.h> -#include <assert.h> +#include <cstdlib> +#include <cstdio> +#include <cassert> #ifdef HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/OpenAL32/alEffect.cpp b/OpenAL32/alEffect.cpp index 498c04e8..ca05bad9 100644 --- a/OpenAL32/alEffect.cpp +++ b/OpenAL32/alEffect.cpp @@ -20,9 +20,9 @@ #include "config.h" -#include <stdlib.h> -#include <math.h> -#include <float.h> +#include <cstdlib> +#include <cmath> +#include <cfloat> #include <algorithm> diff --git a/OpenAL32/alError.cpp b/OpenAL32/alError.cpp index d65b910a..a02d09c9 100644 --- a/OpenAL32/alError.cpp +++ b/OpenAL32/alError.cpp @@ -20,8 +20,8 @@ #include "config.h" -#include <signal.h> -#include <stdarg.h> +#include <csignal> +#include <cstdarg> #ifdef HAVE_WINDOWS_H #define WIN32_LEAN_AND_MEAN diff --git a/OpenAL32/alExtension.cpp b/OpenAL32/alExtension.cpp index e5d4cdf1..3cfc253e 100644 --- a/OpenAL32/alExtension.cpp +++ b/OpenAL32/alExtension.cpp @@ -20,9 +20,9 @@ #include "config.h" -#include <stdlib.h> -#include <string.h> -#include <ctype.h> +#include <cstdlib> +#include <cstring> +#include <cctype> #include "AL/al.h" #include "AL/alc.h" diff --git a/OpenAL32/alFilter.cpp b/OpenAL32/alFilter.cpp index b3aaa0ee..a7b814f6 100644 --- a/OpenAL32/alFilter.cpp +++ b/OpenAL32/alFilter.cpp @@ -20,7 +20,7 @@ #include "config.h" -#include <stdlib.h> +#include <cstdlib> #include <algorithm> diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp index a04ef6b7..236ed144 100644 --- a/OpenAL32/alSource.cpp +++ b/OpenAL32/alSource.cpp @@ -20,9 +20,9 @@ #include "config.h" -#include <stdlib.h> -#include <limits.h> -#include <float.h> +#include <cstdlib> +#include <climits> +#include <cfloat> #include <cmath> #include <thread> diff --git a/common/almalloc.cpp b/common/almalloc.cpp index da0a1d37..35b95001 100644 --- a/common/almalloc.cpp +++ b/common/almalloc.cpp @@ -3,8 +3,8 @@ #include "almalloc.h" -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #ifdef HAVE_MALLOC_H #include <malloc.h> #endif @@ -73,7 +73,7 @@ void al_free(void *ptr) noexcept #endif } -size_t al_get_page_size(void) noexcept +size_t al_get_page_size() noexcept { static size_t psize = 0; if(UNLIKELY(!psize)) @@ -98,7 +98,7 @@ size_t al_get_page_size(void) noexcept return psize; } -int al_is_sane_alignment_allocator(void) noexcept +int al_is_sane_alignment_allocator() noexcept { #if defined(HAVE_ALIGNED_ALLOC) || defined(HAVE_POSIX_MEMALIGN) || defined(HAVE__ALIGNED_MALLOC) return 1; diff --git a/common/threads.cpp b/common/threads.cpp index 69989ae4..45f73243 100644 --- a/common/threads.cpp +++ b/common/threads.cpp @@ -86,7 +86,7 @@ bool semaphore::try_wait() noexcept #else -#include <errno.h> +#include <cerrno> #include <pthread.h> #ifdef HAVE_PTHREAD_NP_H #include <pthread_np.h> diff --git a/utils/makehrtf.cpp b/utils/makehrtf.cpp index ce6643a4..bb42b2d1 100644 --- a/utils/makehrtf.cpp +++ b/utils/makehrtf.cpp @@ -61,15 +61,15 @@ #include "config.h" #define _UNICODE -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <stddef.h> -#include <string.h> -#include <limits.h> -#include <stdint.h> -#include <ctype.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cstdarg> +#include <cstddef> +#include <cstring> +#include <climits> +#include <cstdint> +#include <cctype> +#include <cmath> #ifdef HAVE_STRINGS_H #include <strings.h> #endif |