mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 12:40:25 +00:00
Merge branch 'constexpr' into 'master'
Sprinkle a couple of constexpr found by VS See merge request OpenMW/openmw!800 (cherry picked from commit 5e8ea624bc85acebf457592dd10b790124ecf6ef) 5704b2ac Sprinkle a couple of constexpr found by VS
This commit is contained in:
parent
e6b097085b
commit
e94181b2b2
2 changed files with 5 additions and 5 deletions
|
@ -161,9 +161,9 @@ namespace ESM
|
||||||
{
|
{
|
||||||
// Generate WNAM record
|
// Generate WNAM record
|
||||||
signed char wnam[LAND_GLOBAL_MAP_LOD_SIZE];
|
signed char wnam[LAND_GLOBAL_MAP_LOD_SIZE];
|
||||||
float max = std::numeric_limits<signed char>::max();
|
constexpr float max = std::numeric_limits<signed char>::max();
|
||||||
float min = std::numeric_limits<signed char>::min();
|
constexpr float min = std::numeric_limits<signed char>::min();
|
||||||
float vertMult = static_cast<float>(ESM::Land::LAND_SIZE - 1) / LAND_GLOBAL_MAP_LOD_SIZE_SQRT;
|
constexpr float vertMult = static_cast<float>(ESM::Land::LAND_SIZE - 1) / LAND_GLOBAL_MAP_LOD_SIZE_SQRT;
|
||||||
for (int row = 0; row < LAND_GLOBAL_MAP_LOD_SIZE_SQRT; ++row)
|
for (int row = 0; row < LAND_GLOBAL_MAP_LOD_SIZE_SQRT; ++row)
|
||||||
{
|
{
|
||||||
for (int col = 0; col < LAND_GLOBAL_MAP_LOD_SIZE_SQRT; ++col)
|
for (int col = 0; col < LAND_GLOBAL_MAP_LOD_SIZE_SQRT; ++col)
|
||||||
|
|
|
@ -212,8 +212,8 @@ public:
|
||||||
{
|
{
|
||||||
// We arrived at a leaf.
|
// We arrived at a leaf.
|
||||||
// Since the tree is used for LOD level selection instead of culling, we do not need to load the actual height data here.
|
// Since the tree is used for LOD level selection instead of culling, we do not need to load the actual height data here.
|
||||||
float minZ = -std::numeric_limits<float>::max();
|
constexpr float minZ = -std::numeric_limits<float>::max();
|
||||||
float maxZ = std::numeric_limits<float>::max();
|
constexpr float maxZ = std::numeric_limits<float>::max();
|
||||||
float cellWorldSize = mStorage->getCellWorldSize();
|
float cellWorldSize = mStorage->getCellWorldSize();
|
||||||
osg::BoundingBox boundingBox(osg::Vec3f((center.x()-halfSize)*cellWorldSize, (center.y()-halfSize)*cellWorldSize, minZ),
|
osg::BoundingBox boundingBox(osg::Vec3f((center.x()-halfSize)*cellWorldSize, (center.y()-halfSize)*cellWorldSize, minZ),
|
||||||
osg::Vec3f((center.x()+halfSize)*cellWorldSize, (center.y()+halfSize)*cellWorldSize, maxZ));
|
osg::Vec3f((center.x()+halfSize)*cellWorldSize, (center.y()+halfSize)*cellWorldSize, maxZ));
|
||||||
|
|
Loading…
Reference in a new issue