summaryrefslogtreecommitdiff
path: root/include/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 17:13:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 09:08:13 +0200
commit7281f4a73ec3679798a6271ab5a0ad839f278e37 (patch)
tree3cca53740da25547641c8c8d31dd673aee9d7b35 /include/unotools
parent8ff99af537b2daff07717990be10780ad6824f25 (diff)
use std::unique_ptr in TItemInfo
and inline the TItems typedef Change-Id: I0c50d12d53ce4b52c330cad8790a65065ebdd82e Reviewed-on: https://gerrit.libreoffice.org/42182 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/unotools')
-rw-r--r--include/unotools/itemholderbase.hxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/unotools/itemholderbase.hxx b/include/unotools/itemholderbase.hxx
index 13a11f7e5789..9cb50417c163 100644
--- a/include/unotools/itemholderbase.hxx
+++ b/include/unotools/itemholderbase.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_UNOTOOLS_ITEMHOLDERBASE_HXX
#define INCLUDED_UNOTOOLS_ITEMHOLDERBASE_HXX
+#include <memory>
#include <vector>
#include <osl/mutex.hxx>
@@ -80,17 +81,20 @@ enum class EItem
struct TItemInfo
{
TItemInfo()
- : pItem(nullptr)
- , eItem(EItem::UserOptions)
+ : eItem(EItem::UserOptions)
{
}
- utl::detail::Options * pItem;
+ TItemInfo(TItemInfo&& other)
+ : pItem(std::move(other.pItem))
+ , eItem(other.eItem)
+ {
+ }
+
+ std::unique_ptr<utl::detail::Options> pItem;
EItem eItem;
};
-typedef ::std::vector< TItemInfo > TItems;
-
#endif // INCLUDED_UNOTOOLS_ITEMHOLDERBASE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */