summaryrefslogtreecommitdiff
path: root/include/drawinglayer/animation/animationtiming.hxx
diff options
context:
space:
mode:
authorMark Page <aptitude@btconnect.com>2016-12-05 12:25:30 +0000
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-06 09:23:55 +0000
commit13e77648265a91ec2b7d649d30a108e4e1eff3c8 (patch)
tree807a7acaad95374f5f434c3d0a414967345abcfd /include/drawinglayer/animation/animationtiming.hxx
parent9b8fb821504079e6fb1636dad06e7644a302f39f (diff)
Use std::unique_ptr for AnimationEntry
Change-Id: Ia089be3677adadb4250003b78b7c6bc15ab8bc42 Reviewed-on: https://gerrit.libreoffice.org/31631 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/drawinglayer/animation/animationtiming.hxx')
-rw-r--r--include/drawinglayer/animation/animationtiming.hxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/drawinglayer/animation/animationtiming.hxx b/include/drawinglayer/animation/animationtiming.hxx
index 4514349744aa..67d13eeede0b 100644
--- a/include/drawinglayer/animation/animationtiming.hxx
+++ b/include/drawinglayer/animation/animationtiming.hxx
@@ -23,6 +23,7 @@
#include <drawinglayer/drawinglayerdllapi.h>
#include <vector>
+#include <memory>
namespace drawinglayer
@@ -40,7 +41,7 @@ namespace drawinglayer
public:
AnimationEntry();
virtual ~AnimationEntry();
- virtual AnimationEntry* clone() const = 0;
+ virtual std::unique_ptr<AnimationEntry> clone() const = 0;
virtual bool operator==(const AnimationEntry& rCandidate) const = 0;
virtual double getDuration() const = 0;
@@ -58,7 +59,7 @@ namespace drawinglayer
public:
AnimationEntryFixed(double fDuration, double fState);
virtual ~AnimationEntryFixed() override;
- virtual AnimationEntry* clone() const override;
+ virtual std::unique_ptr<AnimationEntry> clone() const override;
virtual bool operator==(const AnimationEntry& rCandidate) const override;
virtual double getDuration() const override;
@@ -78,7 +79,7 @@ namespace drawinglayer
public:
AnimationEntryLinear(double fDuration, double fFrequency, double fStart, double fStop);
virtual ~AnimationEntryLinear() override;
- virtual AnimationEntry* clone() const override;
+ virtual std::unique_ptr<AnimationEntry> clone() const override;
virtual bool operator==(const AnimationEntry& rCandidate) const override;
virtual double getDuration() const override;
@@ -91,7 +92,7 @@ namespace drawinglayer
{
protected:
double mfDuration;
- ::std::vector< AnimationEntry* > maEntries;
+ ::std::vector< std::unique_ptr<AnimationEntry> > maEntries;
// helpers
sal_uInt32 impGetIndexAtTime(double fTime, double &rfAddedTime) const;
@@ -99,7 +100,7 @@ namespace drawinglayer
public:
AnimationEntryList();
virtual ~AnimationEntryList() override;
- virtual AnimationEntry* clone() const override;
+ virtual std::unique_ptr<AnimationEntry> clone() const override;
virtual bool operator==(const AnimationEntry& rCandidate) const override;
void append(const AnimationEntry& rCandidate);
@@ -117,7 +118,7 @@ namespace drawinglayer
public:
AnimationEntryLoop(sal_uInt32 nRepeat);
virtual ~AnimationEntryLoop() override;
- virtual AnimationEntry* clone() const override;
+ virtual std::unique_ptr<AnimationEntry> clone() const override;
virtual bool operator==(const AnimationEntry& rCandidate) const override;
virtual double getDuration() const override;