Fix compilation on rather old compiler(gcc 5.5)

This commit is contained in:
Syoyo Fujita
2020-04-20 03:04:04 +09:00
parent e81bce5c26
commit ea82de5106
2 changed files with 8 additions and 8 deletions

View File

@@ -3625,7 +3625,7 @@ bool LoadUSDZFromFile(const std::string &filename, Scene *scene,
std::cout << "offset = " << offset << "\n";
// [offset, uncompr_bytes]
assets.push_back({varname, offset, offset + uncompr_bytes});
assets.push_back(std::make_tuple(varname, offset, offset + uncompr_bytes));
offset += uncompr_bytes;
}

View File

@@ -1117,13 +1117,13 @@ struct UVCoords
struct Extent
{
std::array<float, 3> lower[3] = {{
std::array<float, 3> lower = {{
std::numeric_limits<float>::infinity(),
std::numeric_limits<float>::infinity(),
std::numeric_limits<float>::infinity()
}};
std::array<float, 3> upper[3] = {{
std::array<float, 3> upper = {{
-std::numeric_limits<float>::infinity(),
-std::numeric_limits<float>::infinity(),
-std::numeric_limits<float>::infinity()
@@ -1240,8 +1240,8 @@ enum TextureWrap
// result = in * scale * rotate * translation
struct UsdTranform2d {
float rotation = 0.0f; // counter-clockwise rotation in degrees around the origin.
std::array<float, 2> scale{1.0f, 1.0f};
std::array<float, 2> translation{0.0f, 0.0f};
std::array<float, 2> scale{{1.0f, 1.0f}};
std::array<float, 2> translation{{0.0f, 0.0f}};
};
// UsdUvTexture
@@ -1253,9 +1253,9 @@ struct UVTexture {
TextureWrap wrapS;
TextureWrap wrapT;
std::array<float, 4> fallback{0.0f, 0.0f, 0.0f, 1.0f}; // fallback color used when texture cannot be read.
std::array<float, 4> scale{1.0f, 1.0f, 1.0f, 1.0f}; // scale to be applied to output texture value
std::array<float, 4> bias{0.0f, 0.0f, 0.0f, 0.0f}; // bias to be applied to output texture value
std::array<float, 4> fallback{{0.0f, 0.0f, 0.0f, 1.0f}}; // fallback color used when texture cannot be read.
std::array<float, 4> scale{{1.0f, 1.0f, 1.0f, 1.0f}}; // scale to be applied to output texture value
std::array<float, 4> bias{{0.0f, 0.0f, 0.0f, 0.0f}}; // bias to be applied to output texture value
UsdTranform2d texture_transfom;
};