From 4d2d4a64e0778ac4c63ccb545aaa36c7b4c5b27c Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Tue, 6 Apr 2010 00:26:27 +0000 Subject: [PATCH] Fix non ISO compliant use of ternary operator. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@653 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/COBLoader.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/COBLoader.cpp b/code/COBLoader.cpp index eb7d3c930..571423705 100644 --- a/code/COBLoader.cpp +++ b/code/COBLoader.cpp @@ -335,9 +335,15 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill mat->AddProperty(&c,1,AI_MATKEY_COLOR_AMBIENT); // convert textures if some exist. - min->tex_color ? ConvertTexture(min->tex_color,mat,aiTextureType_DIFFUSE) : 0; - min->tex_env ? ConvertTexture(min->tex_env ,mat,aiTextureType_UNKNOWN) : 0; - min->tex_bump ? ConvertTexture(min->tex_bump ,mat,aiTextureType_HEIGHT ) : 0; + if(min->tex_color) { + ConvertTexture(min->tex_color,mat,aiTextureType_DIFFUSE); + } + if(min->tex_env) { + ConvertTexture(min->tex_env ,mat,aiTextureType_UNKNOWN); + } + if(min->tex_bump) { + ConvertTexture(min->tex_bump ,mat,aiTextureType_HEIGHT); + } } } }