sw/source/core/layout/calcmove.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 73c56d8c7830b800aea23ecd083194d7b6ab8a03
Author:     Noel Grandin <n...@peralex.com>
AuthorDate: Tue Sep 28 15:35:21 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Sep 28 18:26:03 2021 +0200

    no need to allocate this on the heap
    
    Change-Id: Ie4935dbf9e5a2a9e7906839b260706a12494b610
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122778
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/layout/calcmove.cxx 
b/sw/source/core/layout/calcmove.cxx
index 98df857e3910..ec53f551f135 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1248,7 +1248,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
     PROTOCOL_ENTER( this, PROT::MakeAll, DbgAction::NONE, nullptr )
 
     // takes care of the notification in the dtor
-    std::unique_ptr<SwContentNotify, o3tl::default_delete<SwContentNotify>> 
pNotify(new SwContentNotify( this ));
+    std::optional<SwContentNotify> oNotify( std::in_place, this );
 
     // as long as bMakePage is true, a new page can be created (exactly once)
     bool bMakePage = true;
@@ -1280,7 +1280,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
 
     if ( !IsFollow() && rAttrs.JoinedWithPrev( *(this) ) )
     {
-        pNotify->SetBordersJoinedWithPrev();
+        oNotify->SetBordersJoinedWithPrev();
     }
 
     const bool bKeep = IsKeep(rAttrs.GetAttrSet().GetKeep(), GetBreakItem());
@@ -1720,7 +1720,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
                           bNxtNew) )
                     {
                         if( bMovedFwd )
-                            pNotify->SetInvaKeep();
+                            oNotify->SetInvaKeep();
                         bMovedFwd = false;
                     }
                 }
@@ -1909,12 +1909,12 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
     UnlockJoin();
     oDeleteGuard.reset();
     if ( bMovedFwd || bMovedBwd )
-        pNotify->SetInvaKeep();
+        oNotify->SetInvaKeep();
     if ( bMovedFwd )
     {
-        pNotify->SetInvalidatePrevPrtArea();
+        oNotify->SetInvalidatePrevPrtArea();
     }
-    pNotify.reset();
+    oNotify.reset();
     SetFlyLock( false );
 }
 

Reply via email to