summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-08 12:03:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-09 15:05:54 +0200
commit1dd5e226bd57254024640b10cbbe639f12564655 (patch)
tree6fbbe3197fbb7f74eaa5786919ced46a06cbf39d /basic
parent027b25ecd54ac97ea2471ca73e3ba89ce052fe76 (diff)
clang-tidy readability-non-const-parameter
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/codegen.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index fee812fead44..384344e2f9b1 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -389,7 +389,7 @@ class PCodeVisitor
public:
virtual ~PCodeVisitor();
- virtual void start( sal_uInt8* pStart ) = 0;
+ virtual void start( const sal_uInt8* pStart ) = 0;
virtual void processOpCode0( SbiOpcode eOp ) = 0;
virtual void processOpCode1( SbiOpcode eOp, T nOp1 ) = 0;
virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 ) = 0;
@@ -405,8 +405,8 @@ class PCodeBufferWalker
{
private:
T m_nBytes;
- sal_uInt8* m_pCode;
- static T readParam( sal_uInt8*& pCode )
+ const sal_uInt8* m_pCode;
+ static T readParam( sal_uInt8 const *& pCode )
{
short nBytes = sizeof( T );
T nOp1=0;
@@ -415,15 +415,15 @@ private:
return nOp1;
}
public:
- PCodeBufferWalker( sal_uInt8* pCode, T nBytes ): m_nBytes( nBytes ), m_pCode( pCode )
+ PCodeBufferWalker( const sal_uInt8* pCode, T nBytes ): m_nBytes( nBytes ), m_pCode( pCode )
{
}
void visitBuffer( PCodeVisitor< T >& visitor )
{
- sal_uInt8* pCode = m_pCode;
+ const sal_uInt8* pCode = m_pCode;
if ( !pCode )
return;
- sal_uInt8* pEnd = pCode + m_nBytes;
+ const sal_uInt8* pEnd = pCode + m_nBytes;
visitor.start( m_pCode );
T nOp1 = 0, nOp2 = 0;
for( ; pCode < pEnd; )
@@ -465,7 +465,7 @@ class OffSetAccumulator : public PCodeVisitor< T >
public:
OffSetAccumulator() : m_nNumOp0(0), m_nNumSingleParams(0), m_nNumDoubleParams(0){}
- virtual void start( sal_uInt8* /*pStart*/ ) override {}
+ virtual void start( const sal_uInt8* /*pStart*/ ) override {}
virtual void processOpCode0( SbiOpcode /*eOp*/ ) override { ++m_nNumOp0; }
virtual void processOpCode1( SbiOpcode /*eOp*/, T /*nOp1*/ ) override { ++m_nNumSingleParams; }
virtual void processOpCode2( SbiOpcode /*eOp*/, T /*nOp1*/, T /*nOp2*/ ) override { ++m_nNumDoubleParams; }
@@ -491,11 +491,11 @@ public:
template < class T, class S >
class BufferTransformer : public PCodeVisitor< T >
{
- sal_uInt8* m_pStart;
+ const sal_uInt8* m_pStart;
SbiBuffer m_ConvertedBuf;
public:
BufferTransformer():m_pStart(nullptr), m_ConvertedBuf( nullptr, 1024 ) {}
- virtual void start( sal_uInt8* pStart ) override { m_pStart = pStart; }
+ virtual void start( const sal_uInt8* pStart ) override { m_pStart = pStart; }
virtual void processOpCode0( SbiOpcode eOp ) override
{
m_ConvertedBuf += (sal_uInt8)eOp;
@@ -544,7 +544,7 @@ public:
{
return m_ConvertedBuf;
}
- static S convertBufferOffSet( sal_uInt8* pStart, T nOp1 )
+ static S convertBufferOffSet( const sal_uInt8* pStart, T nOp1 )
{
PCodeBufferWalker< T > aBuff( pStart, nOp1);
OffSetAccumulator< T, S > aVisitor;