summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 12:19:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-29 12:41:23 +0200
commite4b5aaade285ecad39332ad8b195738feb51151a (patch)
tree90dba973dc0b03b90fc6a7f3f44c0d0b2674370d /sw/inc
parent1df758fce8ac23b54f96f2c0f3dd608bb1da024a (diff)
no need to allocate this hint on the heap
Change-Id: I6321d03cb5786aa0c17705cc8c8bcf1f85326f44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116369 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/calbck.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 11a62033c5cc..0863b2da7f2f 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -30,6 +30,7 @@
#include <type_traits>
#include <vector>
#include <memory>
+#include <optional>
class SwModify;
class SwFormat;
@@ -76,7 +77,6 @@ namespace sw
struct ModifyChangedHint final: SfxHint
{
ModifyChangedHint(const SwModify* pNew) : m_pNew(pNew) {};
- virtual ~ModifyChangedHint() override;
const SwModify* m_pNew;
};
// Observer pattern using svl implementation
@@ -151,7 +151,7 @@ public:
// in case an SwModify object is destroyed that itself is registered in another SwModify,
// its SwClient objects can decide to get registered to the latter instead by calling this method
- std::unique_ptr<sw::ModifyChangedHint> CheckRegistration( const SfxPoolItem* pOldValue );
+ std::optional<sw::ModifyChangedHint> CheckRegistration( const SfxPoolItem* pOldValue );
// SwFormat wants to die different than the rest: It wants to reparent every client to its parent
// and then send a SwFormatChg hint.
void CheckRegistrationFormat(SwFormat& rOld);