summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-01-14 19:52:47 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-02-11 15:42:56 +0100
commit20a646aeda7e940340b0ab11f243c0f09887e1b3 (patch)
treeed0aaa961102824f412ce6be5d950e24de55a01e /sw
parent34b98af8e5a4e568d8316700bea1ce604d825ce8 (diff)
Pointer is always non-null ==> use reference
Change-Id: I9ea6a8233a2f046d2ca56c08b3a2e922cbba2f3b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/tox/tox.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index c86b4c9efc50..d93174cf58af 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -733,15 +733,12 @@ OUString SwFormToken::GetString() const
Returns the type of a token.
@param sToken the string representation of the token
- @param pTokenLen return parameter the length of the head of the token
-
- If pTokenLen is non-NULL the length of the token's head is
- written to *pTokenLen
+ @param rTokenLen return parameter the length of the head of the token
@return the type of the token
*/
static FormTokenType lcl_GetTokenType(const OUString & sToken,
- sal_Int32 *const pTokenLen)
+ sal_Int32 & rTokenLen)
{
static struct
{
@@ -765,8 +762,7 @@ static FormTokenType lcl_GetTokenType(const OUString & sToken,
{
if( sToken.startsWith( i.sTokenStart ) )
{
- if (pTokenLen)
- *pTokenLen = i.nTokenLength;
+ rTokenLen = i.nTokenLength;
return i.eTokenType;
}
}
@@ -827,7 +823,7 @@ lcl_BuildToken(const OUString & sPattern, sal_Int32 & nCurPatternPos)
OUString sToken( lcl_SearchNextToken(sPattern, nCurPatternPos) );
nCurPatternPos += sToken.getLength();
sal_Int32 nTokenLen = 0;
- FormTokenType const eTokenType = lcl_GetTokenType(sToken, &nTokenLen);
+ FormTokenType const eTokenType = lcl_GetTokenType(sToken, nTokenLen);
if (TOKEN_END == eTokenType) // invalid input? skip it
{
nCurPatternPos = sPattern.getLength();