Obj-Parser: Fix performance issue.

pull/1060/head
Kim Kulling 2016-11-08 20:34:55 +01:00
parent d4223d1fce
commit 5ff1c39e02
2 changed files with 3 additions and 1 deletions

View File

@ -230,7 +230,7 @@ template<class T>
inline
bool IOStreamBuffer<T>::getNextLine( std::vector<T> &buffer ) {
buffer.resize( m_cacheSize );
::memset( &buffer[ 0 ], '\n', m_cacheSize );
//::memset( &buffer[ 0 ], '\n', m_cacheSize );
if ( m_cachePos == m_cacheSize || 0 == m_filePos ) {
if ( !readNextBlock() ) {
@ -248,6 +248,7 @@ bool IOStreamBuffer<T>::getNextLine( std::vector<T> &buffer ) {
}
}
}
buffer[ i ] = '\n';
m_cachePos++;
return true;

View File

@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h>
using namespace Assimp;
class utTypes : public ::testing::Test {
// empty
};