mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 06:27:17 +00:00
array initializer did not compile on Steam
This commit is contained in:
parent
9caa4daa62
commit
33060a884c
@ -13,7 +13,7 @@ EX namespace euc {
|
||||
#if HDR
|
||||
struct coord : array<int, 3> {
|
||||
explicit coord() = default;
|
||||
constexpr explicit coord(int x, int y, int z) : array{x,y,z} {}
|
||||
constexpr explicit coord(int x, int y, int z) : array<int,3> {{x,y,z}} {}
|
||||
coord& operator += (coord b) { for(int i: {0,1,2}) self[i] += b[i]; return self; }
|
||||
coord& operator -= (coord b) { for(int i: {0,1,2}) self[i] -= b[i]; return self; }
|
||||
coord operator + (coord b) const { coord a = self; return a += b; }
|
||||
|
@ -908,7 +908,7 @@ EX namespace nilv {
|
||||
struct mvec : array<int, 3> {
|
||||
/** these are in nmHeis */
|
||||
explicit mvec() = default;
|
||||
constexpr explicit mvec(int x, int y, int z) : array{x, y, z} {}
|
||||
constexpr explicit mvec(int x, int y, int z) : array<int, 3>{{x, y, z}} {}
|
||||
mvec inverse() {
|
||||
auto& a = *this;
|
||||
return mvec(-a[0], -a[1], -a[2]+a[1] * a[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user