summaryrefslogtreecommitdiff
path: root/sw/inc/PostItMgr.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 11:48:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 11:48:28 +0100
commit426d55c1a9510be5a95950a94d40463cf4f178fa (patch)
treeca0c42f6a1b621bc92b6cac296cb179026f46f53 /sw/inc/PostItMgr.hxx
parentf725b130e5466a1c4a3a1e070c0eb3548a9a6842 (diff)
loplugin:useuniqueptr in SwPostItPageItem
since we're unconditionally allocating this list, just declare it inline. And make it a std::vector instead of a std::list, it very inefficient storing pointers in a linked list Change-Id: I715868265f9f2e633395f474267e84ee87356726 Reviewed-on: https://gerrit.libreoffice.org/51317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/PostItMgr.hxx')
-rw-r--r--sw/inc/PostItMgr.hxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 1f60c50c15a8..2c801fd6886d 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -69,25 +69,16 @@ namespace i18nutil { struct SearchOptions2; }
#define COL_NOTES_SIDEPANE_ARROW_ENABLED Color(0,0,0)
#define COL_NOTES_SIDEPANE_ARROW_DISABLED Color(172,168,153)
-typedef std::list<SwSidebarItem*> SwSidebarItem_list;
-
struct SwPostItPageItem
{
bool bScrollbar;
sw::sidebarwindows::SidebarPosition eSidebarPosition;
long lOffset;
SwRect mPageRect;
- SwSidebarItem_list* mList;
+ std::vector<SwSidebarItem*> mvSidebarItems;
SwPostItPageItem(): bScrollbar(false), eSidebarPosition( sw::sidebarwindows::SidebarPosition::LEFT ), lOffset(0)
{
- mList = new SwSidebarItem_list;
- }
- ~SwPostItPageItem()
- {
- mList->clear();
- delete mList;
}
-
};
struct FieldShadowState