Obj-Parser: Fix performance issue.
authorKim Kulling <kim.kulling@googlemail.com>
Tue, 8 Nov 2016 19:34:55 +0000 (20:34 +0100)
committerKim Kulling <kim.kulling@googlemail.com>
Tue, 8 Nov 2016 19:34:55 +0000 (20:34 +0100)
code/IOStreamBuffer.h
test/unit/utTypes.cpp

index 9d87942..fe7b2a5 100644 (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;
index 47c39f9..875f662 100644 (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
 };