/** * Parses specified character. * Sets error if parsed character doesnt match. */ void parse(char ch) { char ch2; if(!m_file.readChar(&ch2) || ch2 != ch) { m_err = MapFile::ERROR_PARSE; m_errLine = m_file.line(); } }
/** * Returns true if the next line is empty. */ bool nextLineEmpty() { m_file.skipLine(); char ch; while(m_file.peekChar(&ch) && isspace(ch) && ch != '\n') m_file.readChar(&ch); if(m_file.peekChar(&ch) && ch == '\n') return true; return false; }