code fixes for Hunter-based build
parent
dab8041bcd
commit
5cda81e84b
|
@ -152,6 +152,15 @@ int IOSystem2Unzip::testerror(voidpf /*opaque*/, voidpf /*stream*/) {
|
|||
zlib_filefunc_def IOSystem2Unzip::get(IOSystem* pIOHandler) {
|
||||
zlib_filefunc_def mapping;
|
||||
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
mapping.zopen_file = (open_file_func)open;
|
||||
mapping.zread_file = (read_file_func)read;
|
||||
mapping.zwrite_file = (write_file_func)write;
|
||||
mapping.ztell_file = (tell_file_func)tell;
|
||||
mapping.zseek_file = (seek_file_func)seek;
|
||||
mapping.zclose_file = (close_file_func)close;
|
||||
mapping.zerror_file = (error_file_func)testerror;
|
||||
#else
|
||||
mapping.zopen_file = open;
|
||||
mapping.zread_file = read;
|
||||
mapping.zwrite_file = write;
|
||||
|
@ -159,6 +168,7 @@ zlib_filefunc_def IOSystem2Unzip::get(IOSystem* pIOHandler) {
|
|||
mapping.zseek_file = seek;
|
||||
mapping.zclose_file = close;
|
||||
mapping.zerror_file = testerror;
|
||||
#endif
|
||||
mapping.opaque = reinterpret_cast<voidpf>(pIOHandler);
|
||||
|
||||
return mapping;
|
||||
|
|
|
@ -213,7 +213,11 @@ static void propId2StdString( Property *prop, std::string &name, std::string &ke
|
|||
}
|
||||
|
||||
if ( nullptr != prop->m_key ) {
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
name = prop->m_key->m_text.m_buffer;
|
||||
#else
|
||||
name = prop->m_key->m_buffer;
|
||||
#endif
|
||||
if ( Value::ddl_string == prop->m_value->m_type ) {
|
||||
key = prop->m_value->getString();
|
||||
}
|
||||
|
@ -498,7 +502,11 @@ static void getRefNames( DDLNode *node, std::vector<std::string> &names ) {
|
|||
for( size_t i = 0; i < ref->m_numRefs; i++ ) {
|
||||
Name *currentName( ref->m_referencedName[ i ] );
|
||||
if( nullptr != currentName && nullptr != currentName->m_id ) {
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
const std::string name( currentName->m_id->m_text.m_buffer );
|
||||
#else
|
||||
const std::string name( currentName->m_id->m_buffer );
|
||||
#endif
|
||||
if( !name.empty() ) {
|
||||
names.push_back( name );
|
||||
}
|
||||
|
@ -1039,7 +1047,11 @@ void OpenGEXImporter::handleColorNode( ODDLParser::DDLNode *node, aiScene * /*pS
|
|||
col.g = col4.g;
|
||||
col.b = col4.b;
|
||||
}
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
const ColorType colType( getColorType( &prop->m_key->m_text ) );
|
||||
#else
|
||||
const ColorType colType( getColorType( prop->m_key ) );
|
||||
#endif
|
||||
if( DiffuseColor == colType ) {
|
||||
m_currentMaterial->AddProperty( &col, 1, AI_MATKEY_COLOR_DIFFUSE );
|
||||
} else if( SpecularColor == colType ) {
|
||||
|
|
|
@ -123,6 +123,15 @@ int IOSystem2Unzip::testerror(voidpf /*opaque*/, voidpf /*stream*/) {
|
|||
zlib_filefunc_def IOSystem2Unzip::get(IOSystem* pIOHandler) {
|
||||
zlib_filefunc_def mapping;
|
||||
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
mapping.zopen_file = (open_file_func)open;
|
||||
mapping.zread_file = (read_file_func)read;
|
||||
mapping.zwrite_file = (write_file_func)write;
|
||||
mapping.ztell_file = (tell_file_func)tell;
|
||||
mapping.zseek_file = (seek_file_func)seek;
|
||||
mapping.zclose_file = (close_file_func)close;
|
||||
mapping.zerror_file = (error_file_func)testerror;
|
||||
#else
|
||||
mapping.zopen_file = open;
|
||||
mapping.zread_file = read;
|
||||
mapping.zwrite_file = write;
|
||||
|
@ -130,6 +139,7 @@ zlib_filefunc_def IOSystem2Unzip::get(IOSystem* pIOHandler) {
|
|||
mapping.zseek_file = seek;
|
||||
mapping.zclose_file = close;
|
||||
mapping.zerror_file = testerror;
|
||||
#endif
|
||||
mapping.opaque = (voidpf) pIOHandler;
|
||||
|
||||
return mapping;
|
||||
|
|
Loading…
Reference in New Issue