From 1748e387533c509673268ad225e292102fc80d9b Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Mon, 26 Apr 2010 12:27:36 +0000 Subject: [PATCH] FIX: gcc complains because binding a packed field to a normal reference is not permitted. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@707 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/OgreImporterMaterial.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/code/OgreImporterMaterial.cpp b/code/OgreImporterMaterial.cpp index 1b9310e3f..7690f4c14 100644 --- a/code/OgreImporterMaterial.cpp +++ b/code/OgreImporterMaterial.cpp @@ -120,26 +120,30 @@ aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const ss >> Line; if(Line=="ambient") { - aiColor3D Color; - ss >> Color.r >> Color.g >> Color.b; + float r,g,b; + ss >> r >> g >> b; + const aiColor3D Color(r,g,b); NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_AMBIENT); } else if(Line=="diffuse") { - aiColor3D Color; - ss >> Color.r >> Color.g >> Color.b; + float r,g,b; + ss >> r >> g >> b; + const aiColor3D Color(r,g,b); NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_DIFFUSE); } else if(Line=="specular") { - aiColor3D Color; - ss >> Color.r >> Color.g >> Color.b; + float r,g,b; + ss >> r >> g >> b; + const aiColor3D Color(r,g,b); NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_SPECULAR); } else if(Line=="emmisive") { - aiColor3D Color; - ss >> Color.r >> Color.g >> Color.b; + float r,g,b; + ss >> r >> g >> b; + const aiColor3D Color(r,g,b); NewMaterial->AddProperty(&Color, 1, AI_MATKEY_COLOR_EMISSIVE); } else if(Line=="texture_unit")