refactoring: remove duplicate code.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
This commit is contained in:
Kim Kulling
2014-09-23 23:34:05 +02:00
parent d228dbeab7
commit a5afbcf29c
4 changed files with 34 additions and 50 deletions

View File

@@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ObjTools.h"
#include "ObjFileData.h"
#include "fast_atof.h"
#include "ParsingUtils.h"
namespace Assimp {
@@ -228,7 +229,7 @@ void ObjFileMtlImporter::getColorRGBA( aiColor3D *pColor )
pColor->r = r;
// we have to check if color is default 0 with only one token
if( !isNewLine( *m_DataIt ) ) {
if( !IsLineEnd( *m_DataIt ) ) {
m_DataIt = getFloat<DataArrayIt>( m_DataIt, m_DataItEnd, g );
m_DataIt = getFloat<DataArrayIt>( m_DataIt, m_DataItEnd, b );
}
@@ -257,7 +258,7 @@ void ObjFileMtlImporter::getFloatValue( float &value )
void ObjFileMtlImporter::createMaterial()
{
std::string line( "" );
while ( !isNewLine( *m_DataIt ) ) {
while( !IsLineEnd( *m_DataIt ) ) {
line += *m_DataIt;
++m_DataIt;
}