/** * 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(); } }
/** * Parses specified string. * Sets error if parsed string doesnt match. */ void parse(const char* str) { char buf[256]; m_file.readString(buf, sizeof(buf)); if(strcmp(str, buf)) { m_err = MapFile::ERROR_PARSE; m_errLine = m_file.line(); } }