1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

fixed GCC46 testing

This commit is contained in:
Zeno Rogue 2019-09-13 19:23:22 +02:00
parent 4b47bdb07c
commit e1d6f547a4
3 changed files with 15 additions and 8 deletions

View File

@ -47,14 +47,21 @@ eVariation variation;
struct hyperpoint : array<ld, MAXMDIM> {
hyperpoint() {}
#if ISGCC46
#if MAXMDIM == 4
constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> { ONLY_GCC46((array<ld, MAXMDIM>)) {x, y, z, w}} {
// aaa
constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> { (array<ld, MAXMDIM>) {{x, y, z, w}}} {}
#else
constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> { ONLY_GCC46((array<ld, MAXMDIM>)) {x, y, z}} {
constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> { (array<ld, MAXMDIM>) {{x, y, z}}} {}
#endif
#else
#if MAXMDIM == 4
constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> {{x,y,z,w}} {}
#else
constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> {{x,y,z}} {}
#endif
#endif
// self[0] = x; self[1] = y; self[2] = z;
// if(MAXMDIM == 4) self[3] = w;
}
inline hyperpoint& operator *= (ld d) {
for(int i=0; i<MDIM; i++) self[i] *= d;

View File

@ -216,7 +216,7 @@ EX void apply_memory_reserve() {
}
}
catch(std::bad_alloc&) {}
#if ((ISLINUX && ISSTEAM) || ISWINDOWS)
#if (ISGCC46 || ISWINDOWS)
// no get_new_handler on this compiler...
default_handler = [] { throw std::bad_alloc(); };
#else

View File

@ -49,9 +49,9 @@
#if GCC46
#define override
#define ONLY_GCC46(x) x
#define ISGCC46 1
#else
#define ONLY_GCC46(x)
#define ISGCC46 0
#endif
#ifndef ISWEB