summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-30 10:29:19 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-01 10:43:24 +0000
commit58aea3f36c14414f95668e229a7350598f6c53a8 (patch)
tree70c115dffd44576313cefd49e4164d293895e4bd /basic
parent3fcbfe10857631212d8b8db9a079bb9692ed78bc (diff)
loplugin:unusedmethods
- improvements to the plugin to find more method calls - improvements to python script to remove more false+ - fix the FORCE_COMPILE_ALL build flag to include code in the $WORKDIR Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836 Reviewed-on: https://gerrit.libreoffice.org/19064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/codegen.cxx25
-rw-r--r--basic/source/inc/rtlproto.hxx5
-rw-r--r--basic/source/runtime/props.cxx29
-rw-r--r--basic/source/sbx/sbxconv.hxx1
4 files changed, 12 insertions, 48 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index cd7c197fa3ec..29fece0132c6 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -468,11 +468,11 @@ class OffSetAccumulator : public PCodeVisitor< T >
public:
OffSetAccumulator() : m_nNumOp0(0), m_nNumSingleParams(0), m_nNumDoubleParams(0){}
- virtual void start( sal_uInt8* /*pStart*/ ){}
- virtual void processOpCode0( SbiOpcode /*eOp*/ ){ ++m_nNumOp0; }
- virtual void processOpCode1( SbiOpcode /*eOp*/, T /*nOp1*/ ){ ++m_nNumSingleParams; }
- virtual void processOpCode2( SbiOpcode /*eOp*/, T /*nOp1*/, T /*nOp2*/ ) { ++m_nNumDoubleParams; }
- virtual void end(){}
+ virtual void start( sal_uInt8* /*pStart*/ ) SAL_OVERRIDE {}
+ virtual void processOpCode0( SbiOpcode /*eOp*/ ) SAL_OVERRIDE { ++m_nNumOp0; }
+ virtual void processOpCode1( SbiOpcode /*eOp*/, T /*nOp1*/ ) SAL_OVERRIDE { ++m_nNumSingleParams; }
+ virtual void processOpCode2( SbiOpcode /*eOp*/, T /*nOp1*/, T /*nOp2*/ ) SAL_OVERRIDE { ++m_nNumDoubleParams; }
+ virtual void end() SAL_OVERRIDE {}
S offset()
{
T result = 0 ;
@@ -480,25 +480,24 @@ public:
result = m_nNumOp0 + ( ( sizeof(S) + 1 ) * m_nNumSingleParams ) + ( (( sizeof(S) * 2 )+ 1 ) * m_nNumDoubleParams );
return std::min(static_cast<T>(max), result);
}
- virtual bool processParams(){ return false; }
+ virtual bool processParams() SAL_OVERRIDE { return false; }
};
template < class T, class S >
-
class BufferTransformer : public PCodeVisitor< T >
{
sal_uInt8* m_pStart;
SbiBuffer m_ConvertedBuf;
public:
BufferTransformer():m_pStart(NULL), m_ConvertedBuf( NULL, 1024 ) {}
- virtual void start( sal_uInt8* pStart ){ m_pStart = pStart; }
- virtual void processOpCode0( SbiOpcode eOp )
+ virtual void start( sal_uInt8* pStart ) SAL_OVERRIDE { m_pStart = pStart; }
+ virtual void processOpCode0( SbiOpcode eOp ) SAL_OVERRIDE
{
m_ConvertedBuf += (sal_uInt8)eOp;
}
- virtual void processOpCode1( SbiOpcode eOp, T nOp1 )
+ virtual void processOpCode1( SbiOpcode eOp, T nOp1 ) SAL_OVERRIDE
{
m_ConvertedBuf += (sal_uInt8)eOp;
switch( eOp )
@@ -523,7 +522,7 @@ public:
}
m_ConvertedBuf += static_cast<S>(nOp1);
}
- virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 )
+ virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 ) SAL_OVERRIDE
{
m_ConvertedBuf += (sal_uInt8)eOp;
if ( eOp == _CASEIS )
@@ -533,8 +532,8 @@ public:
m_ConvertedBuf += static_cast<S>(nOp2);
}
- virtual bool processParams(){ return true; }
- virtual void end() {}
+ virtual bool processParams() SAL_OVERRIDE { return true; }
+ virtual void end() SAL_OVERRIDE {}
// yeuch, careful here, you can only call
// GetBuffer on the returned SbiBuffer once, also
// you (as the caller) get to own the memory
diff --git a/basic/source/inc/rtlproto.hxx b/basic/source/inc/rtlproto.hxx
index 7236f78ed2ad..c4b10837c28d 100644
--- a/basic/source/inc/rtlproto.hxx
+++ b/basic/source/inc/rtlproto.hxx
@@ -138,11 +138,6 @@ extern RTLFUNC(CLEAR_ALLTABS);
extern RTLFUNC(CLEAR_TAB);
extern RTLFUNC(SET_TAB);
-extern RTLFUNC(LINEPROP);
-extern RTLFUNC(LINE_1);
-extern RTLFUNC(LINE_15);
-extern RTLFUNC(LINE_2);
-
// Methoden
extern RTLFUNC(CreateObject);
diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx
index 78bd326001c5..221ac9629e2e 100644
--- a/basic/source/runtime/props.cxx
+++ b/basic/source/runtime/props.cxx
@@ -727,35 +727,6 @@ RTLFUNC(SET_TAB)
rPar.Get(0)->PutInteger(0);
}
-RTLFUNC(LINEPROP)
-{
- (void)pBasic;
- (void)bWrite;
-
- rPar.Get(0)->PutInteger(0);
-}
-RTLFUNC(LINE_1)
-{
- (void)pBasic;
- (void)bWrite;
-
- rPar.Get(0)->PutInteger(1);
-}
-RTLFUNC(LINE_15)
-{
- (void)pBasic;
- (void)bWrite;
-
- rPar.Get(0)->PutInteger(2);
-}
-RTLFUNC(LINE_2)
-{
- (void)pBasic;
- (void)bWrite;
-
- rPar.Get(0)->PutInteger(3);
-}
-
RTLFUNC(TYP_JUMPEDITFLD)
{
(void)pBasic;
diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx
index a69b7677e11c..c14a3ac5bc1a 100644
--- a/basic/source/sbx/sbxconv.hxx
+++ b/basic/source/sbx/sbxconv.hxx
@@ -48,7 +48,6 @@ void ImpPutUInt64( SbxValues*, sal_uInt64 );
sal_Int64 ImpDoubleToSalInt64 ( double d );
sal_uInt64 ImpDoubleToSalUInt64( double d );
-double ImpSalInt64ToDouble ( sal_Int64 n );
double ImpSalUInt64ToDouble( sal_uInt64 n );
// SBXLNG.CXX