Skip to content

Commit b9dd959

Browse files
committed
Syntactic sugar
1 parent 5d0c5a4 commit b9dd959

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lima_linguisticprocessing/src/linguisticProcessing/core/DocumentsReader/structuredDocumentXMLParser.cpp

+11-8
Original file line numberDiff line numberDiff line change
@@ -668,34 +668,37 @@ void StructuredDocumentXMLParser::setCurrentByteOffset ( const unsigned int offs
668668
}
669669

670670
//**********************************************************************
671-
bool StructuredDocumentXMLParser::characters ( const QString& ch, unsigned int parserOffset )
671+
bool StructuredDocumentXMLParser::characters ( const QString& ch,
672+
unsigned int parserOffset )
672673
{
673674
QString value = ch;
674675
#ifdef DEBUG_LP
675676
DRLOGINIT;
676-
LDEBUG << "StructuredDocumentXMLParser::characters" << value.left(50) << "(...), length=" << value.size() << parserOffset;
677+
LDEBUG << "StructuredDocumentXMLParser::characters" << value.left(50)
678+
<< "(...), length=" << value.size() << parserOffset;
677679
#endif
678680

679-
AbstractStructuredDocumentElement* currentElement = m_currentDocument->back();
681+
auto currentElement = m_currentDocument->back();
680682
currentElement->setOffset(parserOffset);
681683
if ( !value.isEmpty() )
682684
{
683685
Lima::LimaChar firstChar=value[0];
684686
if ( isSpecialCharacter ( firstChar ) )
685687
{
686688
#ifdef DEBUG_LP
687-
LDEBUG << "StructuredDocumentXMLParser::characters: first char " << firstChar
688-
<< " is special character: add " << getSpecialCharSize ( firstChar )-1 << " spaces";
689+
LDEBUG << "StructuredDocumentXMLParser::characters: first char "
690+
<< firstChar << " is special character: add "
691+
<< getSpecialCharSize ( firstChar )-1 << " spaces";
689692
#endif
690693
Lima::LimaString spaces ( getSpecialCharSize ( firstChar )-1,' ' );
691694
value.insert ( 1,spaces );
692695
}
693696
else
694697
{
695698
#ifdef DEBUG_LP
696-
LDEBUG << "StructuredDocumentXMLParser::characters: first char " << firstChar
697-
<< "(" << firstChar
698-
<< ") is not a special character";
699+
LDEBUG << "StructuredDocumentXMLParser::characters: first char "
700+
<< firstChar << "(" << firstChar
701+
<< ") is not a special character";
699702
#endif
700703
}
701704
currentElement->addToCurrentOffset ( value );

0 commit comments

Comments
 (0)