#endif
for(const SequenceTemplate::PostProcessor &p: tmpl.get_postprocessors())
{
- RefPtr<PostProcessor> proc = 0;
+ PostProcessor *proc = 0;
if(!p.slot_name.empty())
proc = get_item(postprocessors, p.slot_name);
- if(proc)
- sequence.add_postprocessor(*proc);
- else if(p.postprocessor_template)
+ if(!proc)
{
- proc = p.postprocessor_template->create(sequence.get_width(), sequence.get_height());
- if(proc)
+ if(p.postprocessor_template)
{
+ proc = p.postprocessor_template->create(sequence.get_width(), sequence.get_height());
#ifdef DEBUG
if(!debug_name.empty())
proc->set_debug_name(format("%s/%d.pproc", debug_name, index++));
#endif
- sequence.add_postprocessor(*proc.get());
- sequence.add_owned(proc.release());
}
+ else
+ throw invalid_operation("SequenceBuilder::build");
+
+ sequence.add_owned(proc);
}
- if(!proc)
- throw invalid_operation("SequenceBuilder::build");
+ sequence.add_postprocessor(*proc);
}
}