changes according travis build

pull/2005/head
CwTCwT 2018-06-09 16:47:05 +02:00
parent b8facc5dae
commit 2c2b76a2bb
3 changed files with 3 additions and 7 deletions

View File

@ -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"));
}

View File

@ -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

View File

@ -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