More Cppcheck fixes
Former-commit-id: 62ab1caa04543da1a169812bb92a450d44f3aec1
This commit is contained in:
@@ -588,7 +588,7 @@ void SHA256_Init(SHA_CTX* context)
|
||||
|
||||
void SHA256_Internal_Transform(SHA_CTX* context, const nzUInt32* data)
|
||||
{
|
||||
nzUInt32 a, b, c, d, e, f, g, h, s0, s1;
|
||||
nzUInt32 a, b, c, d, e, f, g, h;
|
||||
nzUInt32 T1, *W256;
|
||||
int j;
|
||||
|
||||
@@ -622,6 +622,8 @@ void SHA256_Internal_Transform(SHA_CTX* context, const nzUInt32* data)
|
||||
/* Now for the remaining rounds to 64: */
|
||||
do
|
||||
{
|
||||
nzUInt32 s0, s1;
|
||||
|
||||
ROUND256(a,b,c,d,e,f,g,h);
|
||||
ROUND256(h,a,b,c,d,e,f,g);
|
||||
ROUND256(g,h,a,b,c,d,e,f);
|
||||
|
||||
@@ -104,6 +104,9 @@ nzUInt8 NzHashDigest::operator[](unsigned int pos) const
|
||||
|
||||
NzHashDigest& NzHashDigest::operator=(const NzHashDigest& rhs)
|
||||
{
|
||||
if (this == &rhs)
|
||||
return *this;
|
||||
|
||||
m_hashName = rhs.m_hashName;
|
||||
|
||||
m_digestLength = rhs.m_digestLength;
|
||||
|
||||
@@ -1097,7 +1097,7 @@ unsigned int NzString::FindLastWord(const char* string, int start, nzUInt32 flag
|
||||
{
|
||||
if (it.base() != m_sharedString->string)
|
||||
{
|
||||
it--;
|
||||
--it;
|
||||
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
|
||||
continue;
|
||||
}
|
||||
@@ -1139,7 +1139,7 @@ unsigned int NzString::FindLastWord(const char* string, int start, nzUInt32 flag
|
||||
{
|
||||
if (it.base() != m_sharedString->string)
|
||||
{
|
||||
it--;
|
||||
--it;
|
||||
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
|
||||
continue;
|
||||
}
|
||||
@@ -1280,7 +1280,7 @@ unsigned int NzString::FindLastWord(const NzString& string, int start, nzUInt32
|
||||
{
|
||||
if (it.base() != m_sharedString->string)
|
||||
{
|
||||
it--;
|
||||
--it;
|
||||
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
|
||||
continue;
|
||||
}
|
||||
@@ -1322,7 +1322,7 @@ unsigned int NzString::FindLastWord(const NzString& string, int start, nzUInt32
|
||||
{
|
||||
if (it.base() != m_sharedString->string)
|
||||
{
|
||||
it--;
|
||||
--it;
|
||||
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
|
||||
continue;
|
||||
}
|
||||
@@ -1456,7 +1456,7 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
|
||||
{
|
||||
if (it.base() != m_sharedString->string)
|
||||
{
|
||||
it--;
|
||||
--it;
|
||||
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
|
||||
continue;
|
||||
}
|
||||
@@ -1478,8 +1478,8 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
|
||||
if (NzUnicode::GetLowercase(*tIt) != NzUnicode::GetLowercase(*p))
|
||||
break;
|
||||
|
||||
p++;
|
||||
tIt++;
|
||||
++p;
|
||||
++tIt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1496,7 +1496,7 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
|
||||
{
|
||||
if (it.base() != m_sharedString->string)
|
||||
{
|
||||
it--;
|
||||
--it;
|
||||
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
|
||||
continue;
|
||||
}
|
||||
@@ -1518,8 +1518,8 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
|
||||
if (*tIt != *p)
|
||||
break;
|
||||
|
||||
p++;
|
||||
tIt++;
|
||||
++p;
|
||||
++tIt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1628,7 +1628,7 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
|
||||
{
|
||||
if (it.base() != m_sharedString->string)
|
||||
{
|
||||
it--;
|
||||
--it;
|
||||
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
|
||||
continue;
|
||||
}
|
||||
@@ -1650,8 +1650,8 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
|
||||
if (NzUnicode::GetLowercase(*tIt) != NzUnicode::GetLowercase(*p))
|
||||
break;
|
||||
|
||||
p++;
|
||||
tIt++;
|
||||
++p;
|
||||
++tIt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1668,7 +1668,7 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
|
||||
{
|
||||
if (it.base() != m_sharedString->string)
|
||||
{
|
||||
it--;
|
||||
--it;
|
||||
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
|
||||
continue;
|
||||
}
|
||||
@@ -1690,8 +1690,8 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
|
||||
if (*tIt != *p)
|
||||
break;
|
||||
|
||||
p++;
|
||||
tIt++;
|
||||
++p;
|
||||
++tIt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -638,7 +638,7 @@ NzBoxf NzComputeAABB(NzSparsePtr<const NzVector3f> positionPtr, unsigned int ver
|
||||
if (vertexCount > 0)
|
||||
{
|
||||
aabb.Set(positionPtr->x, positionPtr->y, positionPtr->z, 0.f, 0.f, 0.f);
|
||||
positionPtr++;
|
||||
--positionPtr;
|
||||
|
||||
for (unsigned int i = 1; i < vertexCount; ++i)
|
||||
aabb.ExtendTo(*positionPtr++);
|
||||
|
||||
@@ -333,6 +333,9 @@ bool NzSkeleton::IsValid() const
|
||||
|
||||
NzSkeleton& NzSkeleton::operator=(const NzSkeleton& skeleton)
|
||||
{
|
||||
if (this == &skeleton)
|
||||
return *this;
|
||||
|
||||
Destroy();
|
||||
|
||||
if (skeleton.m_impl)
|
||||
|
||||
Reference in New Issue
Block a user