diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-10-22 18:15:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-22 18:19:19 +0200 |
commit | 8e48edad588dbbb79c0857c3d8bbfd7434a40594 (patch) | |
tree | 25ae259b9d9f43bba83b9415e195f01f4864000a | |
parent | 93e652d1faf6584173161f8ba8ab00003280203e (diff) |
Minor clean-up
Change-Id: I48280cf6e12a5219adaa34f57323a93d21c3f554
-rw-r--r-- | comphelper/source/misc/syntaxhighlight.cxx | 10 | ||||
-rw-r--r-- | include/comphelper/syntaxhighlight.hxx | 5 |
2 files changed, 8 insertions, 7 deletions
diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx index 68d1701b9080..153ec9081da6 100644 --- a/comphelper/source/misc/syntaxhighlight.cxx +++ b/comphelper/source/misc/syntaxhighlight.cxx @@ -676,13 +676,9 @@ void SimpleTokenizer_Impl::getHighlightPortions( sal_uInt32 nParseLine, const OU // Loop over all the tokens while( getNextToken( eType, pStartPos, pEndPos ) ) { - HighlightPortion portion; - - portion.nBegin = pStartPos - mpStringBegin; - portion.nEnd = pEndPos - mpStringBegin; - portion.tokenType = eType; - - portions.push_back(portion); + portions.push_back( + HighlightPortion( + pStartPos - mpStringBegin, pEndPos - mpStringBegin, eType)); } } diff --git a/include/comphelper/syntaxhighlight.hxx b/include/comphelper/syntaxhighlight.hxx index a82986c49429..32790eeda030 100644 --- a/include/comphelper/syntaxhighlight.hxx +++ b/include/comphelper/syntaxhighlight.hxx @@ -48,6 +48,11 @@ struct HighlightPortion { sal_Int32 nBegin; sal_Int32 nEnd; TokenTypes tokenType; + + HighlightPortion( + sal_Int32 theBegin, sal_Int32 theEnd, TokenTypes theTokenType): + nBegin(theBegin), nEnd(theEnd), tokenType(theTokenType) + {} }; ///////////////////////////////////////////////////////////////////////// |