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:
parent
4b47bdb07c
commit
e1d6f547a4
@ -47,14 +47,21 @@ eVariation variation;
|
|||||||
struct hyperpoint : array<ld, MAXMDIM> {
|
struct hyperpoint : array<ld, MAXMDIM> {
|
||||||
hyperpoint() {}
|
hyperpoint() {}
|
||||||
|
|
||||||
|
#if ISGCC46
|
||||||
#if MAXMDIM == 4
|
#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
|
#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
|
#endif
|
||||||
// self[0] = x; self[1] = y; self[2] = z;
|
|
||||||
// if(MAXMDIM == 4) self[3] = w;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline hyperpoint& operator *= (ld d) {
|
inline hyperpoint& operator *= (ld d) {
|
||||||
for(int i=0; i<MDIM; i++) self[i] *= d;
|
for(int i=0; i<MDIM; i++) self[i] *= d;
|
||||||
|
@ -216,7 +216,7 @@ EX void apply_memory_reserve() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(std::bad_alloc&) {}
|
catch(std::bad_alloc&) {}
|
||||||
#if ((ISLINUX && ISSTEAM) || ISWINDOWS)
|
#if (ISGCC46 || ISWINDOWS)
|
||||||
// no get_new_handler on this compiler...
|
// no get_new_handler on this compiler...
|
||||||
default_handler = [] { throw std::bad_alloc(); };
|
default_handler = [] { throw std::bad_alloc(); };
|
||||||
#else
|
#else
|
||||||
|
@ -49,9 +49,9 @@
|
|||||||
|
|
||||||
#if GCC46
|
#if GCC46
|
||||||
#define override
|
#define override
|
||||||
#define ONLY_GCC46(x) x
|
#define ISGCC46 1
|
||||||
#else
|
#else
|
||||||
#define ONLY_GCC46(x)
|
#define ISGCC46 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ISWEB
|
#ifndef ISWEB
|
||||||
|
Loading…
Reference in New Issue
Block a user