From afd3abecc44812a0748caac0fa47b0612f62160d Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Fri, 3 Apr 2020 00:43:34 +0200 Subject: [PATCH] Correctly used Attributes.h instead of a definition directly in SoftwareMixer.cpp Signed-off-by: Gabriel Ravier --- src/Backends/Audio/SoftwareMixer.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Backends/Audio/SoftwareMixer.cpp b/src/Backends/Audio/SoftwareMixer.cpp index afae1b4b..ade44cfa 100644 --- a/src/Backends/Audio/SoftwareMixer.cpp +++ b/src/Backends/Audio/SoftwareMixer.cpp @@ -5,17 +5,12 @@ #include #include #include +#include "../../Attributes.h" #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define CLAMP(x, y, z) MIN(MAX((x), (y)), (z)) -#ifdef __GNUC__ -#define ATTR_HOT __attribute__((hot)) -#else -#define ATTR_HOT -#endif - struct Mixer_Sound { unsigned char *samples; @@ -144,7 +139,7 @@ void Mixer_SetSoundPan(Mixer_Sound *sound, long pan) } // Most CPU-intensive function in the game (2/3rd CPU time consumption in my experience), so marked with attrHot so the compiler considers it a hot spot (as it is) when optimizing -ATTR_HOT void Mixer_MixSounds(float *stream, unsigned int frames_total) +ATTRIBUTE_HOT void Mixer_MixSounds(float *stream, unsigned int frames_total) { for (Mixer_Sound *sound = sound_list_head; sound != NULL; sound = sound->next) {