summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-12-07 23:34:32 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-12-07 23:34:32 +0000
commit93650897c928bfa9ca9b737cfbff55c25271d5d3 (patch)
tree140edc7a4fdb7f1bc5944842a154681964243494 /src/ui/widget
parentupdate to trunk (no conflict) (diff)
downloadinkscape-93650897c928bfa9ca9b737cfbff55c25271d5d3.tar.gz
inkscape-93650897c928bfa9ca9b737cfbff55c25271d5d3.zip
cppification : GHashMaps replaced by stl maps. getResouceList now gives a std::set<SPObject *>.
Should give some performance improvements (quite a few linear lookups are now logarithmic) (bzr r14504.1.6)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/color-icc-selector.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/widget/color-icc-selector.cpp b/src/ui/widget/color-icc-selector.cpp
index 1c31ae33a..2fe4a0704 100644
--- a/src/ui/widget/color-icc-selector.cpp
+++ b/src/ui/widget/color-icc-selector.cpp
@@ -676,9 +676,9 @@ void ColorICCSelectorImpl::_profilesChanged(std::string const &name)
gtk_combo_box_set_active(combo, 0);
int index = 1;
- const GSList *current = SP_ACTIVE_DOCUMENT->getResourceList("iccprofile");
- while (current) {
- SPObject *obj = SP_OBJECT(current->data);
+ std::set<SPObject *> current = SP_ACTIVE_DOCUMENT->getResourceList("iccprofile");
+ for (std::set<SPObject *>::const_iterator it = current.begin(); it != current.end(); ++it) {
+ SPObject *obj = *it;
Inkscape::ColorProfile *prof = reinterpret_cast<Inkscape::ColorProfile *>(obj);
gtk_list_store_append(store, &iter);
@@ -690,7 +690,6 @@ void ColorICCSelectorImpl::_profilesChanged(std::string const &name)
}
index++;
- current = g_slist_next(current);
}
g_signal_handler_unblock(G_OBJECT(_profileSel), _profChangedID);