From ce64dfb3fd9bdee78f21f023c307394bca20651a Mon Sep 17 00:00:00 2001 From: Andrew Parlane Date: Sat, 23 Jan 2016 19:34:20 -0400 Subject: [PATCH] ObjTools: Update getName() to work with const iterators. Ther's no need to convert the input parameter to a char * when we can just leave it as it is. --- code/ObjTools.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ObjTools.h b/code/ObjTools.h index 311965ce3..5406acd6d 100644 --- a/code/ObjTools.h +++ b/code/ObjTools.h @@ -141,7 +141,7 @@ inline char_t getName( char_t it, char_t end, std::string &name ) return end; } - char *pStart = &( *it ); + char_t pStart = it; while( !isEndOfBuffer( it, end ) && !IsLineEnd( *it ) ) { ++it; } @@ -153,10 +153,10 @@ inline char_t getName( char_t it, char_t end, std::string &name ) // Get name // if there is no name, and the previous char is a separator, come back to start - while (&(*it) < pStart) { + while (it < pStart) { ++it; } - std::string strName( pStart, &(*it) ); + std::string strName( pStart, it ); if ( strName.empty() ) return it; else