1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-04 16:49:41 +00:00

Do not assign negative values to unsigned variables

This commit is contained in:
Andrei Kortunov 2021-04-19 16:01:41 +04:00
parent 651ad11ad8
commit 7d5c5f8a24
3 changed files with 3 additions and 4 deletions

View file

@ -860,8 +860,7 @@ namespace MWRender
{
RenderingManager::RayResult result;
result.mHit = false;
result.mHitRefnum.mContentFile = -1;
result.mHitRefnum.mIndex = -1;
result.mHitRefnum.unset();
result.mRatio = 0;
if (intersector->containsIntersections())
{

View file

@ -238,7 +238,7 @@ namespace NifOsg
std::string mFilename;
unsigned int mVersion, mUserVersion, mBethVersion;
size_t mFirstRootTextureIndex = -1;
size_t mFirstRootTextureIndex{~0u};
bool mFoundFirstRootTexturingProperty = false;
bool mHasNightDayLabel = false;

View file

@ -132,7 +132,7 @@ namespace SceneUtil
if (value[0] < 0)
{
positiveColor *= -1.0;
signBit = -1;
signBit = ~0u;
}
unsigned int packedColor = asRGBA(positiveColor);
std::memcpy(&(*mData)[getOffset(index, Diffuse)], &packedColor, sizeof(unsigned int));