mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 16:07:12 +01:00
Fix compilation under MSVC
Use template for std::min and std::max
This commit is contained in:
@@ -221,10 +221,10 @@ public:
|
||||
|
||||
TRect<T> united(const TRect<T> &r) const {
|
||||
TRect<T> tmp;
|
||||
tmp.x1 = std::min(x1, r.x1);
|
||||
tmp.x2 = std::max(x2, r.x2);
|
||||
tmp.y1 = std::min(y1, r.y1);
|
||||
tmp.y2 = std::max(y2, r.y2);
|
||||
tmp.x1 = std::min<T>(x1, r.x1);
|
||||
tmp.x2 = std::max<T>(x2, r.x2);
|
||||
tmp.y1 = std::min<T>(y1, r.y1);
|
||||
tmp.y2 = std::max<T>(y2, r.y2);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
@@ -263,10 +263,10 @@ public:
|
||||
b2 = r.y2;
|
||||
|
||||
TRect<T> tmp;
|
||||
tmp.x1 = std::max(l1, l2);
|
||||
tmp.x2 = std::min(r1, r2);
|
||||
tmp.y1 = std::max(t1, t2);
|
||||
tmp.y2 = std::min(b1, b2);
|
||||
tmp.x1 = std::max<int>(l1, l2);
|
||||
tmp.x2 = std::min<int>(r1, r2);
|
||||
tmp.y1 = std::max<int>(t1, t2);
|
||||
tmp.y2 = std::min<int>(b1, b2);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user