summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-12-09 23:28:39 +0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-09 19:42:58 +0100
commit0fa13a403fed6e729e58963479d34694afa7b8d8 (patch)
treeff9aaeec0975972bb1ae3979ca39b4444e1ef2fb /include
parentd635da1972f15862bb283e77787243fbff8361a6 (diff)
svtools: Simplify ImageMap with std::unique_ptr
Change-Id: I49b3c21ff4d8177fb75197d6641040be0ace6324 Reviewed-on: https://gerrit.libreoffice.org/46149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/imap.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx
index 427d2768b67d..e60efb9990ed 100644
--- a/include/svtools/imap.hxx
+++ b/include/svtools/imap.hxx
@@ -23,6 +23,7 @@
#include <svtools/imapobj.hxx>
#include <svtools/svtdllapi.h>
#include <tools/stream.hxx>
+#include <memory>
#include <vector>
class Point;
@@ -35,7 +36,7 @@ class SVT_DLLPUBLIC ImageMap final
{
private:
- ::std::vector< IMapObject* > maList;
+ std::vector<std::unique_ptr<IMapObject>> maList;
OUString aName;
// binary saving/loading
@@ -81,7 +82,7 @@ public:
// not be destroyed from outside
IMapObject* GetIMapObject( size_t nPos ) const
{
- return ( nPos < maList.size() ) ? maList[ nPos ] : nullptr;
+ return ( nPos < maList.size() ) ? maList[ nPos ].get() : nullptr;
}
// returns the object which was hit first or NULL;