freebsd-ports/games/xptools/files/patch-DEMDefs.h
Kurt Jaeger ca8d1fcedd games/xptools: fix build for 11.2 and current
- lots of fixes

PR:		229517
Submitted by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
Approved by:	Michael Danilov <mike.d.ft402@gmail.com> (maintainer)
2018-07-29 18:49:38 +00:00

37 lines
997 B
C

--- src/XESCore/DEMDefs.h.orig 2018-07-15 04:23:17 UTC
+++ src/XESCore/DEMDefs.h
@@ -1217,14 +1217,32 @@ inline bool& DEMMask::operator()(int x,
inline bool DEMMask::operator()(int x, int y) const
{
- if (x < 0 || x >= mWidth || y < 0 || y >= mHeight) return DEM_NO_DATA;
+ bool b;
+// if (x < 0 || x >= mWidth || y < 0 || y >= mHeight) return DEM_NO_DATA;
+ if (x < 0 || x >= mWidth || y < 0 || y >= mHeight)
+ {
+ b=true;
+ return b;
+ }
+ else
+ {
return mData[x + y * mWidth];
+ }
}
inline bool DEMMask::get(int x, int y) const
{
- if (x < 0 || x >= mWidth || y < 0 || y >= mHeight) return DEM_NO_DATA;
+ bool b;
+// if (x < 0 || x >= mWidth || y < 0 || y >= mHeight) return DEM_NO_DATA;
+ if (x < 0 || x >= mWidth || y < 0 || y >= mHeight)
+ {
+ b=true;
+ return b;
+ }
+ else
+ {
return mData[x + y * mWidth];
+ }
}
inline void DEMMask::set(int x, int y, bool v)