1
0
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:
Zeno Rogue 2023-10-28 09:50:28 +02:00
parent 9caa4daa62
commit 33060a884c
2 changed files with 2 additions and 2 deletions

View File

@ -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; }

View File

@ -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]);