Commit c393ac3f authored by Ing. Jan Trávníček's avatar Ing. Jan Trávníček

clang-tidy: use named constant

parent d185a25f
......@@ -82,7 +82,7 @@ int SaxParseInterface::xmlSAXUserParse(xmlTextReaderPtr reader, ext::deque<Token
bool empty;
switch(xmlTextReaderNodeType(reader)) {
case 1: // START_ELEMENT
case XML_READER_TYPE_ELEMENT: // START_ELEMENT
out.emplace_back ( reinterpret_cast < const char * > ( name ), Token::TokenType::START_ELEMENT );
empty = xmlTextReaderIsEmptyElement(reader);
while(xmlTextReaderMoveToNextAttribute(reader)) {
......@@ -98,13 +98,13 @@ int SaxParseInterface::xmlSAXUserParse(xmlTextReaderPtr reader, ext::deque<Token
}
if ( empty ) out.emplace_back ( reinterpret_cast < const char * > ( name ), Token::TokenType::END_ELEMENT);
break;
case 3: //CHARACTER
case XML_READER_TYPE_TEXT: // CHARACTER
value = xmlTextReaderValue(reader);
if ( ! std::all_of ( value, value + strlen ( reinterpret_cast < const char * > ( value ) ), ext::isspace ) )
out.emplace_back ( reinterpret_cast < const char * > ( value ), Token::TokenType::CHARACTER );
xmlFree(value);
break;
case 15: //END_EMENENT
case XML_READER_TYPE_END_ELEMENT: // END_EMENENT
out.emplace_back ( reinterpret_cast < const char * > ( name ), Token::TokenType::END_ELEMENT);
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment