- 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:
aramis_acg
2011-04-22 21:29:18 +00:00
parent 14c6467aac
commit 6f30639d7f
40 changed files with 194 additions and 190 deletions

View File

@@ -70,11 +70,11 @@ void ScenePreprocessor::ProcessScene ()
// Check whether there are meshes with at least one set of uv coordinates ... add a dummy texture for them
// meshes without texture coordinates receive a boring gray default material.
unsigned int mat0 = 0xffffffff, mat1 = 0xffffffff;
unsigned int mat0 = UINT_MAX, mat1 = UINT_MAX;
for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
if (scene->mMeshes[i]->mTextureCoords[0]) {
if (mat0 == 0xffffffff) {
if (mat0 == UINT_MAX) {
scene->mMaterials[scene->mNumMaterials] = helper = new MaterialHelper();
name.Set("$texture.png");
@@ -88,9 +88,8 @@ void ScenePreprocessor::ProcessScene ()
}
scene->mMeshes[i]->mMaterialIndex = mat0;
}
else
{
if (mat1 == 0xffffffff) {
else {
if (mat1 == UINT_MAX) {
scene->mMaterials[scene->mNumMaterials] = helper = new MaterialHelper();
aiColor3D clr(0.6f,0.6f,0.6f);