cppcheck: noExplicitConstructor
Change-Id: I452a204616d98e1071b7bf43ad457c6a2376cf91
This commit is contained in:
parent
db1aa2b78e
commit
417b9403fe
@ -62,10 +62,10 @@ using namespace ::com::sun::star::io;
|
||||
class OInputStream : public WeakImplHelper1 < XInputStream >
|
||||
{
|
||||
public:
|
||||
OInputStream( const Sequence< sal_Int8 >&seq ) :
|
||||
nPos( 0 ),
|
||||
m_seq( seq )
|
||||
{}
|
||||
explicit OInputStream( const Sequence< sal_Int8 >&seq )
|
||||
: nPos(0)
|
||||
, m_seq(seq)
|
||||
{}
|
||||
|
||||
public:
|
||||
virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
|
||||
|
@ -98,12 +98,17 @@ class WLevDisPatternMem
|
||||
sal_Unicode *cp;
|
||||
bool *bp;
|
||||
public:
|
||||
WLevDisPatternMem( sal_Int32 s ) { cp = new sal_Unicode[ s ];
|
||||
bp = new bool[ s ];
|
||||
}
|
||||
~WLevDisPatternMem() { if (cp) delete [] cp;
|
||||
if (bp) delete [] bp;
|
||||
}
|
||||
explicit WLevDisPatternMem( sal_Int32 s )
|
||||
: cp(new sal_Unicode[s])
|
||||
, bp(new bool[s])
|
||||
{
|
||||
}
|
||||
|
||||
~WLevDisPatternMem()
|
||||
{
|
||||
delete [] cp;
|
||||
delete [] bp;
|
||||
}
|
||||
sal_Unicode* GetcPtr() const { return cp; }
|
||||
bool* GetbPtr() const { return bp; }
|
||||
};
|
||||
@ -112,12 +117,18 @@ class WLevDisDistanceMem
|
||||
{
|
||||
int* p;
|
||||
public:
|
||||
WLevDisDistanceMem( size_t s ) { p = 0; NewMem(s); }
|
||||
~WLevDisDistanceMem() { if (p) delete [] p; }
|
||||
explicit WLevDisDistanceMem( size_t s )
|
||||
: p(0)
|
||||
{
|
||||
NewMem(s);
|
||||
}
|
||||
~WLevDisDistanceMem() { delete [] p; }
|
||||
int* GetPtr() const { return p; }
|
||||
int* NewMem( size_t s ) { if (p) delete [] p;
|
||||
return (p = new int[ s<3 ? 3 : s ]);
|
||||
}
|
||||
int* NewMem( size_t s )
|
||||
{
|
||||
delete [] p;
|
||||
return (p = new int[ s<3 ? 3 : s ]);
|
||||
}
|
||||
};
|
||||
|
||||
/** Weighted Levenshtein Distance (WLD)
|
||||
|
Loading…
x
Reference in New Issue
Block a user