tdf#163486: PVS: redundant nullptr check
V668 There is no sense in testing the 'indxc' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. V668 There is no sense in testing the 'indxr' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. V668 There is no sense in testing the 'ipiv' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: Ifecd9ef5b831e5b312bb428e4d4f72c03cc29b7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175106 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
parent
104cae64df
commit
9c4a485194
1 changed files with 0 additions and 8 deletions
|
@ -47,16 +47,8 @@ std::unique_ptr<double[]> mgcLinearSystemD::NewVector (int N)
|
|||
bool mgcLinearSystemD::Solve (int n, std::unique_ptr<std::unique_ptr<double[]>[]> const & a, double* b)
|
||||
{
|
||||
std::unique_ptr<int[]> indxc( new int[n] );
|
||||
if ( !indxc )
|
||||
return false;
|
||||
std::unique_ptr<int[]> indxr( new int[n] );
|
||||
if ( !indxr ) {
|
||||
return false;
|
||||
}
|
||||
std::unique_ptr<int[]> ipiv( new int[n] );
|
||||
if ( !ipiv ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int i, j, k;
|
||||
int irow = 0;
|
||||
|
|
Loading…
Reference in a new issue