@ -147,7 +147,7 @@ void AbstractImporter::setFileCallback(Containers::Optional<Containers::ArrayVie
void AbstractImporter : : doSetFileCallback ( Containers : : Optional < Containers : : ArrayView < const char > > ( * ) ( const std : : string & , InputFileCallbackPolicy , void * ) , void * ) { }
void AbstractImporter : : doSetFileCallback ( Containers : : Optional < Containers : : ArrayView < const char > > ( * ) ( const std : : string & , InputFileCallbackPolicy , void * ) , void * ) { }
bool AbstractImporter : : openData ( Containers : : ArrayView < const void > data ) {
bool AbstractImporter : : openData ( Containers : : Array < char > & & data , const DataFlags dataFlags ) {
CORRADE_ASSERT ( features ( ) & ImporterFeature : : OpenData ,
CORRADE_ASSERT ( features ( ) & ImporterFeature : : OpenData ,
" Trade::AbstractImporter::openData(): feature not supported " , { } ) ;
" Trade::AbstractImporter::openData(): feature not supported " , { } ) ;
@ -155,10 +155,14 @@ bool AbstractImporter::openData(Containers::ArrayView<const void> data) {
the check doesn ' t be done on the plugin side ) because for some file
the check doesn ' t be done on the plugin side ) because for some file
formats it could be valid ( e . g . OBJ or JSON - based formats ) . */
formats it could be valid ( e . g . OBJ or JSON - based formats ) . */
close ( ) ;
close ( ) ;
doOpenData ( Containers : : Array < char > { const_cast < char * > ( static_cast < const char * > ( data . data ( ) ) ) , data . size ( ) , Implementation : : nonOwnedArrayDeleter } , { } ) ;
doOpenData ( std : : move ( data ) , dataFlags ) ;
return isOpened ( ) ;
return isOpened ( ) ;
}
}
bool AbstractImporter : : openData ( Containers : : ArrayView < const void > data ) {
return openData ( Containers : : Array < char > { const_cast < char * > ( static_cast < const char * > ( data . data ( ) ) ) , data . size ( ) , Implementation : : nonOwnedArrayDeleter } , { } ) ;
}
# ifdef MAGNUM_BUILD_DEPRECATED
# ifdef MAGNUM_BUILD_DEPRECATED
void AbstractImporter : : doOpenData ( Containers : : ArrayView < const char > ) {
void AbstractImporter : : doOpenData ( Containers : : ArrayView < const char > ) {
CORRADE_ASSERT_UNREACHABLE ( " Trade::AbstractImporter::openData(): feature advertised but not implemented " , ) ;
CORRADE_ASSERT_UNREACHABLE ( " Trade::AbstractImporter::openData(): feature advertised but not implemented " , ) ;