Commit 57f8a0f3 authored by Ludovic Hussonnois's avatar Ludovic Hussonnois

WRG: Correct defects reported by Coverity Scan.

parent 35acbade
......@@ -84,7 +84,7 @@ public:
private:
Int32ImageType* m_Input;
Int32ImageType* m_Input = ITK_SP_NULLPTR;
Int32ImageType::Pointer m_Reference;
RAMDrivenAdaptativeStreamingManagerType::Pointer m_StreamingManager;
otb::ogr::DataSource::Pointer m_OgrRef;
......
......@@ -228,13 +228,13 @@ private:
typedef otb::ProfileDerivativeToMultiScaleCharacteristicsFilter<FloatImageType, FloatImageType, LabeledImageType> MultiScaleCharacteristicsFilterType;
// Instantiation
typename OpeningProfileFilterType::Pointer oprofileFilter;
typename ClosingProfileFilterType::Pointer cprofileFilter;
typename DerivativeFilterType::Pointer oderivativeFilter;
typename DerivativeFilterType::Pointer cderivativeFilter;
typename MultiScaleCharacteristicsFilterType::Pointer omsCharFilter;
typename MultiScaleCharacteristicsFilterType::Pointer cmsCharFilter;
typename MultiScaleClassificationFilterType::Pointer classificationFilter;
typename OpeningProfileFilterType::Pointer oprofileFilter = OpeningProfileFilterType::New();
typename ClosingProfileFilterType::Pointer cprofileFilter = ClosingProfileFilterType::New();
typename DerivativeFilterType::Pointer oderivativeFilter = DerivativeFilterType::New();
typename DerivativeFilterType::Pointer cderivativeFilter = DerivativeFilterType::New();
typename MultiScaleCharacteristicsFilterType::Pointer omsCharFilter = MultiScaleCharacteristicsFilterType::New();
typename MultiScaleCharacteristicsFilterType::Pointer cmsCharFilter = MultiScaleCharacteristicsFilterType::New();
typename MultiScaleClassificationFilterType::Pointer classificationFilter = MultiScaleClassificationFilterType::New();
bool classify = profile == "classification";
bool opening = profile == "opening";
......@@ -291,7 +291,6 @@ private:
typedef ImageList<FloatImageType> TImageList;
typedef otb::ImageListToVectorImageFilter<TImageList, FloatVectorImageType> TListToVectorImageFilter;
profileFilter = TProfileFilter::New();
profileFilter->SetInput( m_ExtractorFilter->GetOutput() );
profileFilter->SetProfileSize( profileSize );
profileFilter->SetInitialValue( initValue );
......@@ -307,7 +306,6 @@ private:
return;
}
derivativeFilter = TDerivativeFilter::New();
derivativeFilter->SetInput( profileFilter->GetOutput() );
if ( derivative )
......@@ -320,7 +318,6 @@ private:
return;
}
msCharFilter = TCharacteristicsFilter::New();
msCharFilter->SetInput( derivativeFilter->GetOutput() );
msCharFilter->SetInitialValue( initValue );
msCharFilter->SetStep( step );
......
......@@ -61,6 +61,8 @@ int otbContingencyTableCalculatorSetListSamples(int argc, char* argv[])
int nbSamples = atoi(argv[1]);
int nbClasses = atoi(argv[2]);
if( nbClasses <= 0 )
nbClasses = 1;
for (int i = 0; i < nbSamples; ++i)
{
......
......@@ -151,6 +151,7 @@ QtWidgetView
setObjectName( QtWidgetView::OBJECT_NAME );
m_Model = new otb::Wrapper::QtWidgetModel( otbApp );
m_QuitShortcut = new QShortcut(QKeySequence("Ctrl+Q"), this);
QObject::connect(
m_Model, SIGNAL( SetProgressReportBegin() ),
......@@ -303,7 +304,6 @@ QtWidgetView
);
// Add Ctrl-Q shortcut to quit
m_QuitShortcut = new QShortcut(QKeySequence("Ctrl+Q"), this);
connect( m_QuitShortcut, SIGNAL(activated()), this, SLOT(close()) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment