summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorJörg Barfurth <jb@openoffice.org>2001-12-07 17:15:23 +0000
committerJörg Barfurth <jb@openoffice.org>2001-12-07 17:15:23 +0000
commitd4878b7d8c314bf7fee8948bb5a581df62e745b4 (patch)
treef1d9bf4f7b6d262ef883d4f5e2c9376eda03a56a /configmgr
parent3473e41cc8cf86c2a41080cb67053dcb52ecac5e (diff)
#86807#,#95259# Use modification-safe iteration for visitor
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/tree/cmtreemodel.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/configmgr/source/tree/cmtreemodel.cxx b/configmgr/source/tree/cmtreemodel.cxx
index 07d6bdcd8609..950c01dfecab 100644
--- a/configmgr/source/tree/cmtreemodel.cxx
+++ b/configmgr/source/tree/cmtreemodel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cmtreemodel.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: jb $ $Date: 2001-09-28 12:44:30 $
+ * last change: $Author: jb $ $Date: 2001-12-07 18:15:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -215,12 +215,9 @@ void SubtreeChange::dispatch(ChangeTreeModification& _anAction)
void SubtreeChange::forEachChange(ChangeTreeAction& _anAction) const
{
::std::map< ::rtl::OUString,Change* >::const_iterator aIter = m_aChanges.begin();
- for(;aIter != m_aChanges.end();)
+ while (aIter != m_aChanges.end())
{
- ::std::map< ::rtl::OUString,Change* >::const_iterator aNextIter = aIter;
- ++aNextIter;
- aIter->second->dispatch(_anAction);
- aIter = aNextIter;
+ (aIter++)->second->dispatch(_anAction);
}
}
@@ -228,8 +225,10 @@ void SubtreeChange::forEachChange(ChangeTreeAction& _anAction) const
void SubtreeChange::forEachChange(ChangeTreeModification& _anAction)
{
::std::map< ::rtl::OUString,Change* >::const_iterator aIter = m_aChanges.begin();
- for(;aIter != m_aChanges.end();++aIter)
- aIter->second->dispatch(_anAction);
+ while (aIter != m_aChanges.end())
+ {
+ (aIter++)->second->dispatch(_anAction);
+ }
}
//--------------------------------------------------------------------------