Ver Fonte

changes according travis build

CwTCwT há 7 anos atrás
pai
commit
2c2b76a2bb
3 ficheiros alterados com 3 adições e 7 exclusões
  1. 1 1
      code/BlenderCustomData.cpp
  2. 1 1
      code/BlenderCustomData.h
  3. 1 5
      code/BlenderDNA.inl

+ 1 - 1
code/BlenderCustomData.cpp

@@ -166,7 +166,7 @@ namespace Assimp {
             return cdtype >= 0 && cdtype < CD_NUMTYPES;
         }
 
-        bool readCustomData(std::shared_ptr<void> &out, const CustomDataType cdtype, const size_t cnt, const FileDatabase &db) {
+        bool readCustomData(std::shared_ptr<void> &out, const int cdtype, const size_t cnt, const FileDatabase &db) {
             if (!isValidCustomDataType(cdtype)) {
                 throw Error((Formatter::format(), "CustomData.type ", cdtype, " out of index"));
             }

+ 1 - 1
code/BlenderCustomData.h

@@ -76,7 +76,7 @@ namespace Assimp {
         *   @param[in]  db to read elements from
         *   @return true when ok
         */
-        bool readCustomData(std::shared_ptr<void> &out, CustomDataType cdtype, size_t cnt, const FileDatabase &db);
+        bool readCustomData(std::shared_ptr<void> &out, int cdtype, size_t cnt, const FileDatabase &db);
 
         /**
         *   @brief  returns CustomDataLayer ptr for given cdtype and name

+ 1 - 5
code/BlenderDNA.inl

@@ -311,10 +311,6 @@ void Structure :: ReadField(T& out, const char* name, const FileDatabase& db) co
 // field parsing for raw untyped data (like CustomDataLayer.data)
 template <int error_policy>
 bool Structure::ReadCustomDataPtr(std::shared_ptr<void>&out, int cdtype, const char* name, const FileDatabase& db) const {
-	if (!isValidCustomDataType(cdtype))	{
-		ASSIMP_LOG_ERROR("given rawtype out of index");
-		return false;
-	}
 
 	const StreamReaderAny::pos old = db.reader->GetCurrentPos();
 
@@ -345,7 +341,7 @@ bool Structure::ReadCustomDataPtr(std::shared_ptr<void>&out, int cdtype, const c
 		const FileBlockHead* block = LocateFileBlockForAddress(ptrval, db);
 		db.reader->SetCurrentPos(block->start + static_cast<size_t>((ptrval.val - block->address.val)));
 		// read block->num instances of given type to out
-		readOk = readCustomData(out, static_cast<CustomDataType>(cdtype), block->num, db);
+		readOk = readCustomData(out, cdtype, block->num, db);
 	}
 
 	// and recover the previous stream position