void-packages/srcpkgs/mame/patches/fix-std_min_constexpr.patch
2016-08-31 09:58:45 +02:00

14 lines
748 B
Diff

With gcc-4.9.4 libstdc++ std::min() is not a constexpr as required
by c++14 conforming compilers. Replace std::min with a conditional.
--- src/devices/video/poly.h 2016-08-31 03:47:01.000000000 +0200
+++ src/devices/video/poly.h 2016-08-31 07:56:47.483694756 +0200
@@ -224,7 +224,7 @@
// internal array types
typedef poly_array<polygon_info, _MaxPolys> polygon_array;
typedef poly_array<_ObjectData, _MaxPolys + 1> objectdata_array;
- typedef poly_array<work_unit, std::min(_MaxPolys * UNITS_PER_POLY, 65535)> unit_array;
+ typedef poly_array<work_unit, (_MaxPolys * UNITS_PER_POLY < 65535 ? _MaxPolys * UNITS_PER_POLY : 65535)> unit_array;
// round in a cross-platform consistent manner
inline INT32 round_coordinate(_BaseType value)