Replace __attribute__ keywords with a macro to improve compiler compatibility.

This commit is contained in:
King_DuckZ 2014-08-14 12:00:04 +02:00
parent dff58a98ef
commit 4e89878eb4
13 changed files with 118 additions and 48 deletions

View file

@ -18,12 +18,13 @@
*/
#include "moverleftright.hpp"
#include "compatibility.h"
#include <algorithm>
#include <cmath>
namespace cloonel {
namespace {
float Clamp ( float parValue, float parMin, float parMax ) __attribute__((pure));
float Clamp ( float parValue, float parMin, float parMax ) a_pure;
float Clamp ( float parValue, float parMin, float parMax ) {
assert(parMin <= parMax);
return std::max(parMin, std::min(parMax, parValue));