소스 검색

3DS: Initialize Material name in initializer list

Turo Lamminen 7 년 전
부모
커밋
e6ff15d201
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      code/3DSHelper.h

+ 2 - 2
code/3DSHelper.h

@@ -376,7 +376,8 @@ struct Material
 
     //! Constructor with explicit name
     explicit Material(const std::string &name)
-    : mDiffuse            ( ai_real( 0.6 ), ai_real( 0.6 ), ai_real( 0.6 ) ) // FIX ... we won't want object to be black
+    : mName(name)
+    , mDiffuse            ( ai_real( 0.6 ), ai_real( 0.6 ), ai_real( 0.6 ) ) // FIX ... we won't want object to be black
     , mSpecularExponent   ( ai_real( 0.0 ) )
     , mShininessStrength  ( ai_real( 1.0 ) )
     , mShading(Discreet3DS::Gouraud)
@@ -384,7 +385,6 @@ struct Material
     , mBumpHeight         ( ai_real( 1.0 ) )
     , mTwoSided           (false)
     {
-        mName = name;
     }