diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /src/object/sp-item-group.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip | |
modernize loops
Diffstat (limited to 'src/object/sp-item-group.cpp')
| -rw-r--r-- | src/object/sp-item-group.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/object/sp-item-group.cpp b/src/object/sp-item-group.cpp index fead94274..c6b6f7340 100644 --- a/src/object/sp-item-group.cpp +++ b/src/object/sp-item-group.cpp @@ -896,8 +896,7 @@ void SPGroup::update_patheffect(bool write) { #endif std::vector<SPItem*> const item_list = sp_item_group_item_list(this); - for ( std::vector<SPItem*>::const_iterator iter=item_list.begin();iter!=item_list.end();++iter) { - SPObject *sub_item = *iter; + for (auto sub_item : item_list) { if (sub_item) { SPLPEItem *lpe_item = dynamic_cast<SPLPEItem *>(sub_item); if (lpe_item) { @@ -908,9 +907,9 @@ void SPGroup::update_patheffect(bool write) { this->resetClipPathAndMaskLPE(); if (hasPathEffect() && pathEffectsEnabled()) { - for (PathEffectList::iterator it = this->path_effect_list->begin(); it != this->path_effect_list->end(); ++it) + for (auto & it : *this->path_effect_list) { - LivePathEffectObject *lpeobj = (*it)->lpeobject; + LivePathEffectObject *lpeobj = it->lpeobject; if (lpeobj) { Inkscape::LivePathEffect::Effect *lpe = lpeobj->get_lpe(); if (lpe) { @@ -927,8 +926,7 @@ static void sp_group_perform_patheffect(SPGroup *group, SPGroup *top_group, Inkscape::LivePathEffect::Effect *lpe, bool write) { std::vector<SPItem*> const item_list = sp_item_group_item_list(group); - for ( std::vector<SPItem*>::const_iterator iter=item_list.begin();iter!=item_list.end();++iter) { - SPObject *sub_item = *iter; + for (auto sub_item : item_list) { SPGroup *sub_group = dynamic_cast<SPGroup *>(sub_item); if (sub_group) { sp_group_perform_patheffect(sub_group, top_group, lpe, write); |
