From 55c4bfc5717c6f915e8760eec95be76813d5fce8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 19 Aug 2021 10:00:01 +0200 Subject: use std::optional in SdrUndoAttrObj it is a COW object, no need to allocate separately on heap Change-Id: Ibfecb263eedb6ef5eca8122e80a564cb1e872db1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120699 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/svx/svdundo.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/svx') diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx index ccfa69476bba..0064aa85c6c5 100644 --- a/include/svx/svdundo.hxx +++ b/include/svx/svdundo.hxx @@ -154,10 +154,10 @@ protected: bool bHaveToTakeRedoSet; // When assigning TextItems to a drawing object with text: - std::unique_ptr pTextUndo; + std::optional pTextUndo; // #i8508# // The text rescue mechanism needs also to be implemented for redo actions. - std::unique_ptr pTextRedo; + std::optional pTextRedo; // If we have a group object: std::unique_ptr pUndoGroup; -- cgit