diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-03-30 22:09:09 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-03-30 22:09:21 +0100 |
commit | 51e05acf07093ac8f2b2dc8eeb86abe9446e3463 (patch) | |
tree | 349d8311d949fed9e3328468544b408a7cf04256 /cui | |
parent | 8c1b2f380188f7c7194845dd014e802427967273 (diff) |
Simplify a bit iterators stuff
Change-Id: Ie2159d5eb8caf3d8f13d9c1ec49cc2bb6a0d94eb
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 0392d1f250a6..63497966709d 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2068,12 +2068,10 @@ SvTreeListEntry* SvxConfigPage::AddFunction( // check that this function is not already in the menu SvxConfigEntry* pParent = GetTopLevelSelection(); - SvxEntries::const_iterator iter = pParent->GetEntries()->begin(); - SvxEntries::const_iterator end = pParent->GetEntries()->end(); - if ( !bAllowDuplicates ) { - while ( iter != end ) + for (SvxEntries::const_iterator iter(pParent->GetEntries()->begin()), end(pParent->GetEntries()->end()); + iter != end ; ++iter) { SvxConfigEntry *pCurEntry = *iter; @@ -2085,8 +2083,6 @@ SvTreeListEntry* SvxConfigPage::AddFunction( delete pNewEntryData; return NULL; } - - ++iter; } } |