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