summaryrefslogtreecommitdiff
path: root/svgio/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-05 09:46:12 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-06 06:48:38 +0000
commitf3d9aab8410c00298f29ca0194c5d33d53c63ff2 (patch)
tree370d24d49547d8eb2cdbcb293992d9b9a4a670ed /svgio/source
parent654c98064d3fd2bd1e13ae2bda5f84e8d51d0071 (diff)
teach passstuffbyref plugin to check for..
unnecessarily passing primitives by const ref. Suggested by Tor Lillqvist Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6 Reviewed-on: https://gerrit.libreoffice.org/24672 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svgio/source')
-rw-r--r--svgio/source/svgreader/svgtools.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx
index 3bc457344cb4..b3925c0e1dbb 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -292,17 +292,17 @@ namespace svgio
return basegfx::fTools::moreOrEqual(mfNumber, 0.0);
}
- void skip_char(const OUString& rCandidate, const sal_Unicode& rChar, sal_Int32& nPos, const sal_Int32 nLen)
+ void skip_char(const OUString& rCandidate, sal_Unicode nChar, sal_Int32& nPos, const sal_Int32 nLen)
{
- while(nPos < nLen && rChar == rCandidate[nPos])
+ while(nPos < nLen && nChar == rCandidate[nPos])
{
nPos++;
}
}
- void skip_char(const OUString& rCandidate, const sal_Unicode& rCharA, const sal_Unicode& rCharB, sal_Int32& nPos, const sal_Int32 nLen)
+ void skip_char(const OUString& rCandidate, sal_Unicode nCharA, sal_Unicode nCharB, sal_Int32& nPos, const sal_Int32 nLen)
{
- while(nPos < nLen && (rCharA == rCandidate[nPos] || rCharB == rCandidate[nPos]))
+ while(nPos < nLen && (nCharA == rCandidate[nPos] || nCharB == rCandidate[nPos]))
{
nPos++;
}
@@ -380,9 +380,9 @@ namespace svgio
}
}
- void copyToLimiter(const OUString& rCandidate, const sal_Unicode& rLimiter, sal_Int32& nPos, OUStringBuffer& rTarget, const sal_Int32 nLen)
+ void copyToLimiter(const OUString& rCandidate, sal_Unicode nLimiter, sal_Int32& nPos, OUStringBuffer& rTarget, const sal_Int32 nLen)
{
- while(nPos < nLen && rLimiter != rCandidate[nPos])
+ while(nPos < nLen && nLimiter != rCandidate[nPos])
{
rTarget.append(rCandidate[nPos]);
nPos++;
@@ -622,19 +622,19 @@ namespace svgio
return false;
}
- sal_Int32 read_hex(const sal_Unicode& rChar)
+ sal_Int32 read_hex(sal_Unicode nChar)
{
- if(rChar >= '0' && rChar <= '9')
+ if(nChar >= '0' && nChar <= '9')
{
- return sal_Int32(rChar - sal_Unicode('0'));
+ return sal_Int32(nChar - sal_Unicode('0'));
}
- else if(rChar >= 'A' && rChar <= 'F')
+ else if(nChar >= 'A' && nChar <= 'F')
{
- return 10 + sal_Int32(rChar - sal_Unicode('A'));
+ return 10 + sal_Int32(nChar - sal_Unicode('A'));
}
- else if(rChar >= 'a' && rChar <= 'f')
+ else if(nChar >= 'a' && nChar <= 'f')
{
- return 10 + sal_Int32(rChar - sal_Unicode('a'));
+ return 10 + sal_Int32(nChar - sal_Unicode('a'));
}
else
{
@@ -1514,7 +1514,7 @@ namespace svgio
}
}
- OUString convert(const OUString& rCandidate, const sal_Unicode& rPattern, const sal_Unicode& rNew, bool bRemove)
+ OUString convert(const OUString& rCandidate, sal_Unicode nPattern, sal_Unicode nNew, bool bRemove)
{
const sal_Int32 nLen(rCandidate.getLength());
@@ -1528,13 +1528,13 @@ namespace svgio
{
const sal_Unicode aChar(rCandidate[nPos]);
- if(rPattern == aChar)
+ if(nPattern == aChar)
{
bChanged = true;
if(!bRemove)
{
- aBuffer.append(rNew);
+ aBuffer.append(nNew);
}
}
else