changes according travis build
parent
b8facc5dae
commit
2c2b76a2bb
|
@ -166,7 +166,7 @@ namespace Assimp {
|
||||||
return cdtype >= 0 && cdtype < CD_NUMTYPES;
|
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)) {
|
if (!isValidCustomDataType(cdtype)) {
|
||||||
throw Error((Formatter::format(), "CustomData.type ", cdtype, " out of index"));
|
throw Error((Formatter::format(), "CustomData.type ", cdtype, " out of index"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ namespace Assimp {
|
||||||
* @param[in] db to read elements from
|
* @param[in] db to read elements from
|
||||||
* @return true when ok
|
* @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
|
* @brief returns CustomDataLayer ptr for given cdtype and name
|
||||||
|
|
|
@ -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)
|
// field parsing for raw untyped data (like CustomDataLayer.data)
|
||||||
template <int error_policy>
|
template <int error_policy>
|
||||||
bool Structure::ReadCustomDataPtr(std::shared_ptr<void>&out, int cdtype, const char* name, const FileDatabase& db) const {
|
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();
|
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);
|
const FileBlockHead* block = LocateFileBlockForAddress(ptrval, db);
|
||||||
db.reader->SetCurrentPos(block->start + static_cast<size_t>((ptrval.val - block->address.val)));
|
db.reader->SetCurrentPos(block->start + static_cast<size_t>((ptrval.val - block->address.val)));
|
||||||
// read block->num instances of given type to out
|
// 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
|
// and recover the previous stream position
|
||||||
|
|
Loading…
Reference in New Issue