diff --git a/code/B3DImporter.cpp b/code/B3DImporter.cpp index bc888fb66..46008bf31 100644 --- a/code/B3DImporter.cpp +++ b/code/B3DImporter.cpp @@ -267,6 +267,21 @@ T *B3DImporter::to_array( const vector &v ){ return p; } + +// ------------------------------------------------------------------------------------------------ +template +T **unique_to_array( vector > &v ){ + if( v.empty() ) { + return 0; + } + T **p = new T*[ v.size() ]; + for( size_t i = 0; i < v.size(); ++i ){ + p[i] = v[i].release(); + } + return p; +} + + // ------------------------------------------------------------------------------------------------ void B3DImporter::ReadTEXS(){ while( ChunkSize() ){