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
21
src/line.hpp
21
src/line.hpp
|
@ -20,6 +20,7 @@
|
|||
#ifndef id56F112C6551D44039D0C0270F573B35B
|
||||
#define id56F112C6551D44039D0C0270F573B35B
|
||||
|
||||
#include "compatibility.h"
|
||||
#include "vector.hpp"
|
||||
#include "vectormath.hpp"
|
||||
|
||||
|
@ -42,30 +43,30 @@ namespace cloonel {
|
|||
const Point& Start ( void ) const { return m_points.x(); }
|
||||
const Point& End ( void ) const { return m_points.y(); }
|
||||
|
||||
Line& operator+= ( const Point& parRhs ) __attribute__((flatten));
|
||||
Line& operator-= ( const Point& parRhs ) __attribute__((flatten));
|
||||
Line& operator+= ( const Point& parRhs ) a_flatten;
|
||||
Line& operator-= ( const Point& parRhs ) a_flatten;
|
||||
|
||||
private:
|
||||
Vector<Point, 2> m_points;
|
||||
};
|
||||
|
||||
template <typename T, uint32_t S>
|
||||
Line<T, S> operator+ ( Line<T, S> parLhs, const Vector<T, S>& parRhs ) __attribute__((pure)) __attribute__((flatten));
|
||||
Line<T, S> operator+ ( Line<T, S> parLhs, const Vector<T, S>& parRhs ) a_pure a_flatten;
|
||||
template <typename T, uint32_t S>
|
||||
Line<T, S> operator- ( Line<T, S> parLhs, const Vector<T, S>& parRhs ) __attribute__((pure)) __attribute__((flatten));
|
||||
Line<T, S> operator- ( Line<T, S> parLhs, const Vector<T, S>& parRhs ) a_pure a_flatten;
|
||||
template <typename T, uint32_t S>
|
||||
Line<T, S> operator+ ( const Vector<T, S>& parLhs, Line<T, S> parRhs ) __attribute__((pure)) __attribute__((flatten));
|
||||
Line<T, S> operator+ ( const Vector<T, S>& parLhs, Line<T, S> parRhs ) a_pure a_flatten;
|
||||
template <typename T, uint32_t S>
|
||||
Line<T, S> operator- ( const Vector<T, S>& parLhs, Line<T, S> parRhs ) __attribute__((pure)) __attribute__((flatten));
|
||||
Line<T, S> operator- ( const Vector<T, S>& parLhs, Line<T, S> parRhs ) a_pure a_flatten;
|
||||
|
||||
template <typename T>
|
||||
bool operator> ( const Vector<T, 2>& parLhs, const Line<T, 2>& parRhs ) __attribute__((pure));
|
||||
bool operator> ( const Vector<T, 2>& parLhs, const Line<T, 2>& parRhs ) a_pure;
|
||||
template <typename T>
|
||||
bool operator< ( const Vector<T, 2>& parLhs, const Line<T, 2>& parRhs ) __attribute__((pure));
|
||||
bool operator< ( const Vector<T, 2>& parLhs, const Line<T, 2>& parRhs ) a_pure;
|
||||
template <typename T>
|
||||
bool operator>= ( const Vector<T, 2>& parLhs, const Line<T, 2>& parRhs ) __attribute__((pure));
|
||||
bool operator>= ( const Vector<T, 2>& parLhs, const Line<T, 2>& parRhs ) a_pure;
|
||||
template <typename T>
|
||||
bool operator<= ( const Vector<T, 2>& parLhs, const Line<T, 2>& parRhs ) __attribute__((pure));
|
||||
bool operator<= ( const Vector<T, 2>& parLhs, const Line<T, 2>& parRhs ) a_pure;
|
||||
} //namespace cloonel
|
||||
|
||||
#include "line.inl"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue