Commit fb647a85 authored by Cédric Traizet's avatar Cédric Traizet

ENH: use smart pointer for writers in Sink

parent add4ae9c
Pipeline #2738 passed with stages
in 18 minutes and 18 seconds
......@@ -138,7 +138,7 @@ public:
* when you already have an instanciated writer.
*/
template <class TWriter>
void AddInputWriter(const TWriter* writer)
void AddInputWriter(typename TWriter::Pointer writer)
{
Sink<typename TWriter::InputImageType>* sink = new Sink<typename TWriter::InputImageType>(writer);
m_SinkList.push_back(SinkBase::Pointer(sink));
......@@ -265,7 +265,7 @@ private:
{
}
Sink(typename TImage::ConstPointer inputImage, const std::string& filename);
Sink(typename otb::ImageFileWriter<TImage>::ConstPointer writer);
Sink(typename otb::ImageFileWriter<TImage>::Pointer writer);
virtual ~Sink()
{
......
......@@ -37,8 +37,8 @@ MultiImageFileWriter::Sink<TImage>::Sink(typename TImage::ConstPointer inputImag
}
template <class TImage>
MultiImageFileWriter::Sink<TImage>::Sink(typename otb::ImageFileWriter<TImage>::ConstPointer writer)
: SinkBase(dynamic_cast<const ImageBaseType*>(writer->GetInput()->GetPointer())), m_Writer(writer), m_ImageIO(NULL)
MultiImageFileWriter::Sink<TImage>::Sink(typename otb::ImageFileWriter<TImage>::Pointer writer)
: SinkBase(dynamic_cast<const ImageBaseType*>(writer->GetInput())), m_Writer(writer), m_ImageIO(NULL)
{
}
......
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