return shared_ptr from createDocumentElement
which is what the only callsite wants Change-Id: Ica83e7de89ec56c9b4f742f3da19d295a3250a9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -270,9 +270,8 @@ namespace pdfi
|
||||
struct DocumentElement : public Element
|
||||
{
|
||||
friend class ElementFactory;
|
||||
protected:
|
||||
DocumentElement() : Element( nullptr ) {}
|
||||
public:
|
||||
DocumentElement() : Element( nullptr ) {}
|
||||
virtual ~DocumentElement() override;
|
||||
|
||||
virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override;
|
||||
@@ -307,8 +306,8 @@ namespace pdfi
|
||||
static PageElement* createPageElement( Element* pParent,
|
||||
sal_Int32 nPageNr )
|
||||
{ return new PageElement( pParent, nPageNr ); }
|
||||
static DocumentElement* createDocumentElement()
|
||||
{ return new DocumentElement(); }
|
||||
static std::shared_ptr<DocumentElement> createDocumentElement()
|
||||
{ return std::make_shared<DocumentElement>(); }
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user