Permalink
Browse files

replace std::min max with selfwritten implementations to fix lightmap…

…ping

vec::min/max were broken with the std versions
  • Loading branch information...
a-teammate committed Nov 4, 2015
1 parent dced7cd commit ba8dd46289e39a51a67b40fe32d3e19607b63f2e
Showing with 7 additions and 2 deletions.
  1. +7 −2 inexor/shared/tools.h
@@ -40,8 +40,13 @@ typedef unsigned long long int ullong;
#endif
using std::swap;
using std::min;
using std::max;
/// return the minimal value of the two given.
/// we do not use the std:: version here because it crashes inside the vec-implementation.
template<class A, class B> inline A(min)(A val1, B val2) { return val1 > val2 ? val2 : val1; }
/// return the bigger value of the two given.
/// we do not use the std:: version here because it crashes inside the vec-implementation.
template<class A, class B> inline A(max)(A val1, B val2) { return val2 > val1 ? val2 : val1; }
using boost::algorithm::clamp;
#ifdef __GNUC__

0 comments on commit ba8dd46

Please sign in to comment.