mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-30 18:34:32 +00:00
Merge branch 'fix_msvc_warnings' into 'master'
Fix C4244 in navmeshtilescache benchmark See merge request OpenMW/openmw!5011
This commit is contained in:
commit
3abc719aa6
1 changed files with 3 additions and 3 deletions
|
|
@ -94,9 +94,9 @@ namespace
|
||||||
std::vector<AreaType> areaTypes;
|
std::vector<AreaType> areaTypes;
|
||||||
if (distribution(random) < 0.939)
|
if (distribution(random) < 0.939)
|
||||||
{
|
{
|
||||||
generateVertices(std::back_inserter(vertices), triangles * 2.467, random);
|
generateVertices(std::back_inserter(vertices), static_cast<std::size_t>(triangles * 2.467), random);
|
||||||
generateIndices(std::back_inserter(indices), static_cast<int>(vertices.size() / 3) - 1,
|
generateIndices(std::back_inserter(indices), static_cast<int>(vertices.size() / 3) - 1,
|
||||||
vertices.size() * 1.279, random);
|
static_cast<std::size_t>(vertices.size() * 1.279), random);
|
||||||
generateAreaTypes(std::back_inserter(areaTypes), indices.size() / 3, random);
|
generateAreaTypes(std::back_inserter(areaTypes), indices.size() / 3, random);
|
||||||
}
|
}
|
||||||
return Mesh(std::move(indices), std::move(vertices), std::move(areaTypes));
|
return Mesh(std::move(indices), std::move(vertices), std::move(areaTypes));
|
||||||
|
|
@ -109,7 +109,7 @@ namespace
|
||||||
result.mCellPosition = generateVec2i(1000, random);
|
result.mCellPosition = generateVec2i(1000, random);
|
||||||
result.mCellSize = ESM::Land::REAL_SIZE;
|
result.mCellSize = ESM::Land::REAL_SIZE;
|
||||||
result.mMinHeight = distribution(random);
|
result.mMinHeight = distribution(random);
|
||||||
result.mMaxHeight = result.mMinHeight + 1.0;
|
result.mMaxHeight = result.mMinHeight + 1.0f;
|
||||||
result.mLength = static_cast<std::uint8_t>(ESM::Land::LAND_SIZE);
|
result.mLength = static_cast<std::uint8_t>(ESM::Land::LAND_SIZE);
|
||||||
std::generate_n(
|
std::generate_n(
|
||||||
std::back_inserter(result.mHeights), ESM::Land::LAND_NUM_VERTS, [&] { return distribution(random); });
|
std::back_inserter(result.mHeights), ESM::Land::LAND_NUM_VERTS, [&] { return distribution(random); });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue