Replace __attribute__ keywords with a macro to improve compiler compatibility.
This commit is contained in:
parent
dff58a98ef
commit
4e89878eb4
13 changed files with 118 additions and 48 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue