summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-05 12:24:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-05 12:45:26 +0100
commit00da9792c51e2dd36c81e66493b8cafc1588104b (patch)
tree8ed3c914fda0f9afce659a1d3684bcda06a4d9ef /include
parent3be2a53ee1a34fd4bc96e7817191fc3e0eb3c917 (diff)
simplify SfxEventNamesList
no need to store elements of vector on the heap Change-Id: I314372b8f81b117c07676263c0c3481b51374f33 Reviewed-on: https://gerrit.libreoffice.org/67397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/evntconf.hxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/sfx2/evntconf.hxx b/include/sfx2/evntconf.hxx
index 5db89bc023b6..86769b324f95 100644
--- a/include/sfx2/evntconf.hxx
+++ b/include/sfx2/evntconf.hxx
@@ -35,9 +35,9 @@ class SvxMacroTableDtor;
struct SFX2_DLLPUBLIC SfxEventName
{
- SvMacroItemId const mnId;
- OUString const maEventName;
- OUString const maUIName;
+ SvMacroItemId mnId;
+ OUString maEventName;
+ OUString maUIName;
SfxEventName( SvMacroItemId nId,
const OUString& rEventName,
@@ -50,7 +50,7 @@ struct SFX2_DLLPUBLIC SfxEventName
class SFX2_DLLPUBLIC SfxEventNamesList
{
private:
- ::std::vector< std::unique_ptr<SfxEventName> > aEventNamesList;
+ ::std::vector< SfxEventName > aEventNamesList;
public:
SfxEventNamesList() {}
@@ -60,10 +60,10 @@ public:
size_t size() const { return aEventNamesList.size(); };
- SfxEventName* at( size_t Index ) const
- { return Index < aEventNamesList.size() ? aEventNamesList[ Index ].get() : nullptr; }
+ SfxEventName& at( size_t Index ) { return aEventNamesList[ Index ]; }
+ SfxEventName const & at( size_t Index ) const { return aEventNamesList[ Index ]; }
- void push_back( std::unique_ptr<SfxEventName> Item ) { aEventNamesList.push_back( std::move(Item) ); }
+ void push_back( SfxEventName Item ) { aEventNamesList.push_back( std::move(Item) ); }
};
class SFX2_DLLPUBLIC SfxEventNamesItem : public SfxPoolItem