Commit fa93eaec authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

Merge branch '1706-otb-does-not-compile-with-gcc-8-1' into 'develop'

Resolve "OTB does not compile with GCC 8.1"

Closes #1706

See merge request orfeotoolbox/otb!216
parents 11ba4594 49d88ee5
......@@ -287,7 +287,7 @@ int main(int argc, char* argv[])
{
writer->Update();
}
catch (itk::ExceptionObject e)
catch ( itk::ExceptionObject & e )
{
std::cerr << "Error: " << e << std::endl;
}
......
......@@ -30,7 +30,7 @@ int otbImageToEdgePathFilter(int itkNotUsed(argc), char * argv[])
{
const char * inputFilename = argv[1];
const char * outputFilename = argv[2];
const unsigned int foreground((const unsigned int) ::atoi(argv[3]));
const unsigned int foreground = atoi(argv[3]);
const unsigned int Dimension = 2;
typedef unsigned char PixelType;
......
......@@ -119,7 +119,7 @@ void CoordinateToName::DoEvaluate()
m_Curl->RetrieveUrlInMemory(urlStream.str(), m_CurlOutput);
m_IsValid = true;
}
catch(itk::ExceptionObject)
catch( itk::ExceptionObject & )
{
m_IsValid = false;
}
......
......@@ -107,7 +107,7 @@ void PlaceNameToLonLat::RetrieveXML(const std::ostringstream& urlStream)
m_RequestSucceed = true;
m_Curl->RetrieveUrlInMemory(urlStream.str(), m_CurlOutput);
}
catch(itk::ExceptionObject)
catch( itk::ExceptionObject & )
{
m_RequestSucceed = false;
}
......
......@@ -57,7 +57,7 @@ int otbImageToOSMVectorDataGenerator(int argc, char * argv[])
{
parser->ParseCommandLine(argc, argv, parseResult);
}
catch ( itk::ExceptionObject )
catch ( itk::ExceptionObject & )
{
return EXIT_FAILURE;
}
......
......@@ -65,7 +65,7 @@ int otbOSMToVectorDataGeneratorByName (int argc, char * argv[])
{
parser->ParseCommandLine(argc, argv, parseResult);
}
catch ( itk::ExceptionObject )
catch ( itk::ExceptionObject & )
{
return EXIT_FAILURE;
}
......
......@@ -80,7 +80,7 @@ typename StandardDSCostFunction<TDSValidationFilter>
{
internalFunctionGT->SetDescriptorModels(descModel);
}
catch (itk::ExceptionObject /*& err*/)
catch ( itk::ExceptionObject & )
{
return 1;
}
......
......@@ -125,11 +125,11 @@ public:
* vector should be same as the number of component (or classes).
* Choose between SetInitialProportions, SetClassLabels or
* SetNumberOfComponents */
void SetInitialProportions(ProportionVectorType& propotion);
ProportionVectorType* GetInitialProportions();
void SetInitialProportions(ProportionVectorType& proportions);
itkGetConstReferenceMacro(InitialProportions,ProportionVectorType);
/** Gets the result proportion values */
ProportionVectorType* GetProportions();
itkGetConstReferenceMacro(Proportions,ProportionVectorType);
/** Set/Gets the initial segmentation. the size of the vector should be
* the same as the number of samples (length of MeasurementVector) */
......
......@@ -99,14 +99,6 @@ SEMClassifier<TInputImage, TOutputImage>
m_ExternalLabels = 0;
}
template<class TInputImage, class TOutputImage>
typename SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType*
SEMClassifier<TInputImage, TOutputImage>
::GetInitialProportions()
{
return m_InitialProportions;
}
template<class TInputImage, class TOutputImage>
void
SEMClassifier<TInputImage, TOutputImage>
......@@ -228,14 +220,6 @@ SEMClassifier<TInputImage, TOutputImage>
return m_ClassLabels;
}
template<class TInputImage, class TOutputImage>
typename SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType*
SEMClassifier<TInputImage, TOutputImage>
::GetProportions()
{
return &m_Proportions;
}
template<class TInputImage, class TOutputImage>
void
SEMClassifier<TInputImage, TOutputImage>
......
......@@ -124,7 +124,7 @@ int otbConfusionMatrixCalculatorWrongSize(int argc, char* argv[])
{
calculator->Compute();
}
catch (itk::ExceptionObject)
catch ( itk::ExceptionObject & )
{
return EXIT_FAILURE;
}
......
......@@ -38,7 +38,7 @@ int otbAeronetExtractDataBadData(int itkNotUsed(argc), char * argv[])
{
reader->Update();
}
catch (itk::ExceptionObject e)
catch ( itk::ExceptionObject & )
{
return EXIT_SUCCESS;
}
......
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