From: Kim Kulling Date: Tue, 8 Nov 2016 19:34:55 +0000 (+0100) Subject: Obj-Parser: Fix performance issue. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ff1c39e02d08265a631a2cf7141e3465022972a;p=platform%2Fupstream%2Fassimp.git Obj-Parser: Fix performance issue. --- diff --git a/code/IOStreamBuffer.h b/code/IOStreamBuffer.h index 9d87942..fe7b2a5 100644 --- a/code/IOStreamBuffer.h +++ b/code/IOStreamBuffer.h @@ -230,7 +230,7 @@ template inline bool IOStreamBuffer::getNextLine( std::vector &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::getNextLine( std::vector &buffer ) { } } } + buffer[ i ] = '\n'; m_cachePos++; return true; diff --git a/test/unit/utTypes.cpp b/test/unit/utTypes.cpp index 47c39f9..875f662 100644 --- a/test/unit/utTypes.cpp +++ b/test/unit/utTypes.cpp @@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include using namespace Assimp; + class utTypes : public ::testing::Test { // empty };