소스 검색

SubDivision: fix compiler warning: unused variable.

Kim Kulling 8 년 전
부모
커밋
6dfff37d8f
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      code/Subdivision.cpp

+ 3 - 4
code/Subdivision.cpp

@@ -532,9 +532,7 @@ void CatmullClarkSubdivider::InternSubdivide (
 
                             ai_assert(adj[o]-moffsets[nidx].first < mp->mNumFaces);
                             const aiFace& f = mp->mFaces[adj[o]-moffsets[nidx].first];
-#               ifdef ASSIMP_BUILD_DEBUG
                             bool haveit = false;
-#               endif
 
                             // find our original point in the face
                             for (unsigned int m = 0; m < f.mNumIndices; ++m) {
@@ -555,15 +553,16 @@ void CatmullClarkSubdivider::InternSubdivide (
                                     // fixme: replace with mod face.mNumIndices?
                                     R += c0.midpoint+c1.midpoint;
 
-#                       ifdef ASSIMP_BUILD_DEBUG
                                     haveit = true;
-#                       endif
                                     break;
                                 }
                             }
 
                             // this invariant *must* hold if the vertex-to-face adjacency table is valid
                             ai_assert(haveit);
+                            if ( !haveit ) {
+                                DefaultLogger::get()->warn( "OBJ: no name for material library specified." );
+                            }
                         }
 
                         const float div = static_cast<float>(cnt), divsq = 1.f/(div*div);