summaryrefslogtreecommitdiff
path: root/svtools/source/contnr/treelistentry.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-07-20 21:27:01 +0200
committerMichael Stahl <mstahl@redhat.com>2015-07-20 22:43:52 +0200
commitcd74d49de55e87a4e801e8a245d198ea51d0ec34 (patch)
tree01f0afd36edcacdbca76440d19f8555311358b6a /svtools/source/contnr/treelistentry.cxx
parent1fc105cec523a081f18ca78fff43e58e3a881232 (diff)
svtools: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: I895c950c11499afb278b989565f3eae33aaf4a76
Diffstat (limited to 'svtools/source/contnr/treelistentry.cxx')
-rw-r--r--svtools/source/contnr/treelistentry.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx
index 29f597669859..54d88937df82 100644
--- a/svtools/source/contnr/treelistentry.cxx
+++ b/svtools/source/contnr/treelistentry.cxx
@@ -27,16 +27,15 @@
void SvTreeListEntry::ClearChildren()
{
- maChildren.clear();
+ m_Children.clear();
}
void SvTreeListEntry::SetListPositions()
{
- SvTreeListEntries::iterator it = maChildren.begin(), itEnd = maChildren.end();
sal_uLong nCur = 0;
- for (; it != itEnd; ++it)
+ for (auto const& pEntry : m_Children)
{
- SvTreeListEntry& rEntry = *it;
+ SvTreeListEntry& rEntry = *pEntry;
rEntry.nListPos &= 0x80000000;
rEntry.nListPos |= nCur;
++nCur;
@@ -70,9 +69,8 @@ SvTreeListEntry::SvTreeListEntry(const SvTreeListEntry& r)
, nEntryFlags(r.nEntryFlags)
, maBackColor(Application::GetSettings().GetStyleSettings().GetWindowColor())
{
- SvTreeListEntries::const_iterator it = r.maChildren.begin(), itEnd = r.maChildren.end();
- for (; it != itEnd; ++it)
- maChildren.push_back(new SvTreeListEntry(*it));
+ for (auto const& it : r.m_Children)
+ m_Children.push_back(std::unique_ptr<SvTreeListEntry>(new SvTreeListEntry(*it)));
}
SvTreeListEntry::~SvTreeListEntry()
@@ -81,13 +79,13 @@ SvTreeListEntry::~SvTreeListEntry()
pParent = 0;
#endif
- maChildren.clear();
+ m_Children.clear();
m_Items.clear();
}
bool SvTreeListEntry::HasChildren() const
{
- return !maChildren.empty();
+ return !m_Children.empty();
}
bool SvTreeListEntry::HasChildListPos() const