- refraing from using magic numbers like 0xffffffff all over the repository, rather use UINT_MAX/SIZE_MAX ..
- minor re-formatting and refactoring at some old code spots. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@970 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -401,7 +401,7 @@ void StandardShapes::MakeCone(float height,float radius1,
|
||||
std::swap(radius2,radius1);
|
||||
halfHeight = -halfHeight;
|
||||
}
|
||||
else old = 0xffffffff;
|
||||
else old = SIZE_MAX;
|
||||
|
||||
// Use a large epsilon to check whether the cone is pointy
|
||||
if (radius1 < (radius2-radius1)*10e-3f)radius1 = 0.f;
|
||||
@@ -460,10 +460,10 @@ void StandardShapes::MakeCone(float height,float radius1,
|
||||
}
|
||||
|
||||
// Need to flip face order?
|
||||
if (0xffffffff != old )
|
||||
{
|
||||
for (size_t s = old; s < positions.size();s += 3)
|
||||
if ( SIZE_MAX != old ) {
|
||||
for (size_t s = old; s < positions.size();s += 3) {
|
||||
std::swap(positions[s],positions[s+1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user