EgtGeneral 1.5e1 :
- in CmdParser aggiunta gestione DirReplace - in Scanner se RemInit è nullptr non si gestiscono i commenti.
This commit is contained in:
@@ -38,10 +38,11 @@ Scanner::Init( const std::string& sFile, const char* szRemInit, bool bSkipEmptyL
|
||||
m_sFName = sFile ;
|
||||
|
||||
// assegno i caratteri di inizio commento
|
||||
if ( szRemInit != NULL)
|
||||
if ( szRemInit != nullptr)
|
||||
m_sRemInit = szRemInit ;
|
||||
else
|
||||
m_sRemInit = "//" ;
|
||||
m_sRemInit = "" ;
|
||||
m_bFindRem = ! m_sRemInit.empty() ;
|
||||
|
||||
// assegno flag per saltare linee vuote
|
||||
m_bSkipEmptyLine = bSkipEmptyLine ;
|
||||
@@ -83,7 +84,8 @@ Scanner::GetLine( string& sLine)
|
||||
TrimUtf8Bom( sLine) ;
|
||||
Trim( sLine) ;
|
||||
m_nLineNbr ++ ;
|
||||
} while ( ( m_bSkipEmptyLine && sLine.empty()) || sLine.find( m_sRemInit) == 0) ;
|
||||
} while ( ( m_bSkipEmptyLine && sLine.empty()) ||
|
||||
( m_bFindRem && sLine.find( m_sRemInit) == 0)) ;
|
||||
m_nDeltaLineUnget = m_nLineNbr - nOldLineNbr ;
|
||||
}
|
||||
return true ;
|
||||
|
||||
Reference in New Issue
Block a user