diff --git a/code/pixel_array.h b/code/pixel_array.h index 960210f..08984c5 100644 --- a/code/pixel_array.h +++ b/code/pixel_array.h @@ -42,8 +42,9 @@ template class PixelArray { delete [] mPixels; } - // A non-terrain value - static const Pixel EmptyPixel = -32738; + // A non-terrain value; also don't overlap with peak or saddle + // indexes. + static const Pixel EmptyPixel = std::numeric_limits::min(); Pixel get(int x, int y) const { return mPixels[y * mWidth + x];