const char* tmp( &m_DataIt[0] );
bool end_of_definition = false;
while ( !end_of_definition ) {
- //while( !IsLineEnd( *tmp ) ) {
if ( isDataDefinitionEnd( tmp ) ) {
tmp += 2;
} else if ( IsLineEnd( *tmp ) ) {
// -------------------------------------------------------------------
// Get values for a new face instance
void ObjFileParser::getFace( aiPrimitiveType type ) {
- //copyNextLine(m_buffer, Buffersize);
- //char *pPtr = m_DataIt;
- //char *pPtr = m_buffer;
- //char *pEnd = &pPtr[Buffersize];
m_DataIt = getNextToken<DataArrayIt>( m_DataIt, m_DataItEnd );
if ( m_DataIt == m_DataItEnd || *m_DataIt == '\0' ) {
return;
// Get a comment, values will be skipped
void ObjFileParser::getComment() {
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
-
-/* while (m_DataIt != m_DataItEnd) {
- if ( '\n' == (*m_DataIt)) {
- ++m_DataIt;
- break;
- } else {
- ++m_DataIt;
- }
- }*/
}
// -------------------------------------------------------------------
+#pragma once
+
// Copyright (C) 2002-2007 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine" and the "irrXML" project.
// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h
#include <assimp/defs.h>
#include "StringComparison.h"
+#include <assimp/DefaultLogger.hpp>
#ifdef _MSC_VER
uint64_t value = 0;
if ( *in < '0' || *in > '9' )
- throw std::invalid_argument(std::string("The string \"") + in + "\" cannot be converted into a value.");
+ throw std::invalid_argument(std::string("The string \"") + in + "\" cannot be converted into a value.");
bool running = true;
while ( running )
const uint64_t new_value = ( value * 10 ) + ( *in - '0' );
- if (new_value < value) /* numeric overflow, we rely on you */
- throw std::overflow_error(std::string("Converting the string \"") + in + "\" into a value resulted in overflow.");
+ // numeric overflow, we rely on you
+ if ( new_value < value ) {
+ DefaultLogger::get()->warn( std::string( "Converting the string \"" ) + in + "\" into a value resulted in overflow." );
+ return 0;
+ }
+ //throw std::overflow_error();
value = new_value;