fix implicit qvec conversions reported as errors

in Apple clang version 12.0.0 with std=c++2a mode
This commit is contained in:
Eric Wasylishen 2022-11-12 19:39:31 -07:00
parent d7acd046c3
commit 276aa147dc
3 changed files with 7 additions and 7 deletions

View File

@ -188,7 +188,7 @@ TEST_CASE("PolygonCentroid")
const std::initializer_list<qvec3d> poly{{0, 0, 0}, {0, 32, 0}, // colinear
{0, 64, 0}, {64, 64, 0}, {64, 0, 0}};
CHECK(qvec3f(32, 32, 0) == qv::PolyCentroid(poly.begin(), poly.end()));
CHECK(qvec3d(32, 32, 0) == qv::PolyCentroid(poly.begin(), poly.end()));
}
TEST_CASE("PolygonArea")

View File

@ -1146,7 +1146,7 @@ TEST_CASE("q1_cube")
REQUIRE_FALSE(prt.has_value());
const aabb3d cube_bounds {
const aabb3f cube_bounds {
{32, -240, 80},
{80, -144, 112}
};
@ -1157,8 +1157,8 @@ TEST_CASE("q1_cube")
// check the solid leaf
auto& solid_leaf = bsp.dleafs[0];
CHECK(solid_leaf.mins == qvec3d(0,0,0));
CHECK(solid_leaf.maxs == qvec3d(0,0,0));
CHECK(solid_leaf.mins == qvec3f(0,0,0));
CHECK(solid_leaf.maxs == qvec3f(0,0,0));
// check the empty leafs
for (int i = 1; i < 7; ++i) {
@ -1208,7 +1208,7 @@ TEST_CASE("q1_clip_func_wall" * doctest::test_suite("testmaps_q1"))
REQUIRE(prt.has_value());
const aabb3d cube_bounds {
const aabb3f cube_bounds {
{64, 64, 48},
{128, 128, 80}
};

View File

@ -492,8 +492,8 @@ TEST_CASE("q2_door" * doctest::test_suite("testmaps_q2")) {
CHECK(GAME_QUAKE_II == bsp.loadversion->game->id);
const aabb3d world_tight_bounds {{-64, -64, -16}, {64, 80, 128}};
const aabb3d bmodel_tight_bounds {{-48, 48, 16}, {48, 64, 112}};
const aabb3f world_tight_bounds {{-64, -64, -16}, {64, 80, 128}};
const aabb3f bmodel_tight_bounds {{-48, 48, 16}, {48, 64, 112}};
CHECK(world_tight_bounds.mins() == bsp.dmodels[0].mins);
CHECK(world_tight_bounds.maxs() == bsp.dmodels[0].maxs);