Browse Source

NFF: Split up some complicated assignments

Turo Lamminen 7 years ago
parent
commit
3f299b2a2b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      code/NFFLoader.cpp

+ 4 - 2
code/NFFLoader.cpp

@@ -1079,7 +1079,8 @@ void NFFImporter::InternReadFile( const std::string& pFile,
     // generate the camera
     // generate the camera
     if (hasCam)
     if (hasCam)
     {
     {
-        aiNode* nd = *ppcChildren = new aiNode();
+        aiNode* nd = new aiNode();
+        *ppcChildren = nd;
         nd->mName.Set("<NFF_Camera>");
         nd->mName.Set("<NFF_Camera>");
         nd->mParent = root;
         nd->mParent = root;
 
 
@@ -1109,7 +1110,8 @@ void NFFImporter::InternReadFile( const std::string& pFile,
         {
         {
             const Light& l = lights[i];
             const Light& l = lights[i];
 
 
-            aiNode* nd = *ppcChildren  = new aiNode();
+            aiNode* nd = new aiNode();
+            *ppcChildren = nd;
             nd->mParent = root;
             nd->mParent = root;
 
 
             nd->mName.length = ::ai_snprintf(nd->mName.data,1024,"<NFF_Light%u>",i);
             nd->mName.length = ::ai_snprintf(nd->mName.data,1024,"<NFF_Light%u>",i);