Commit 84bae027 authored by Victor Poughon's avatar Victor Poughon

BUG: keep same contract for SetFileName methods

parent bb48391a
......@@ -52,10 +52,12 @@ void
OGRExtendedFilenameToOptions::
SetExtendedFileName(const char* extFname)
{
if (extFname)
{
this->SetExtendedFileName(std::string(extFname));
}
if (extFname == nullptr)
{
itkGenericExceptionMacro( << "Filename is NULL" );
}
this->SetExtendedFileName(std::string(extFname));
}
void
......
......@@ -63,10 +63,12 @@ void
ExtendedFilenameToWriterOptions
::SetExtendedFileName(const char* extFname)
{
if (extFname)
{
this->SetExtendedFileName(std::string(extFname));
}
if (extFname == nullptr)
{
itkGenericExceptionMacro( << "Filename is NULL" );
}
this->SetExtendedFileName(std::string(extFname));
}
void
......
......@@ -845,10 +845,12 @@ void
ImageFileWriter<TInputImage>
::SetFileName(const char* extendedFileName)
{
if (extendedFileName)
{
this->SetFileName(std::string(extendedFileName));
}
if (extFname == nullptr)
{
itkGenericExceptionMacro( << "Filename is NULL" );
}
this->SetFileName(std::string(extendedFileName));
}
template <class TInputImage>
......
......@@ -837,10 +837,12 @@ void
SimpleParallelTiffWriter<TInputImage>
::SetFileName(const char* extendedFileName)
{
if (extendedFileName)
{
this->SetFileName(std::string(extendedFileName));
}
if (extFname == nullptr)
{
itkGenericExceptionMacro( << "Filename is NULL" );
}
this->SetFileName(std::string(extendedFileName));
}
template <class TInputImage>
......
......@@ -63,7 +63,7 @@ template <typename TImage>
void
MPIVrtWriter<TImage>::SetFileName(const char* extendedFileName)
{
if (extendedFileName)
if (m_Filename.compare(extendedFileName) != 0 )
{
this->SetFileName(std::string(extendedFileName));
}
......
......@@ -302,10 +302,7 @@ ComplexOutputImageParameter::HasValue() const
void ComplexOutputImageParameter::SetFileName (const char* filename)
{
if (filename)
{
this->SetFileName(std::string(filename));
}
this->SetFileName(std::string(filename));
}
void ComplexOutputImageParameter::SetFileName (const std::string& filename)
......
......@@ -534,10 +534,7 @@ OutputImageParameter::SwitchInput(UInt8RGBImageType *img)
void OutputImageParameter::SetFileName (const char* filename)
{
if (filename)
{
this->SetFileName(std::string(filename));
}
this->SetFileName(std::string(filename));
}
void OutputImageParameter::SetFileName (const std::string& filename)
......
......@@ -48,10 +48,7 @@ VectorDataType* OutputVectorDataParameter::GetValue( void )
void OutputVectorDataParameter::SetFileName (const char* filename)
{
if (filename)
{
this->SetFileName(std::string(filename));
}
this->SetFileName(std::string(filename));
}
void OutputVectorDataParameter::SetFileName (const std::string& filename)
......
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